Skip to content

Commit

Permalink
Removed repeating.
Browse files Browse the repository at this point in the history
  • Loading branch information
DJGosnell committed Aug 24, 2023
1 parent 8d3bf43 commit cc7ae1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ public async Task PipeReaderReceivesDataMultipleTimes(Type type)

for (int i = 0; i < iterations; i++)
{
await Task.Delay(1);
await using var pipe = sNexus.Context.CreatePipe();
await sNexus.Context.Clients.Caller.ClientTaskValueWithDuplexPipe(pipe);
await pipe.ReadyTask;
await pipe.Output.WriteAsync(Data);
}


await tcs.Task.Timeout(2);
await tcs.Task.Timeout(20);
}

[TestCase(Type.Uds)]
Expand Down Expand Up @@ -118,7 +119,6 @@ public async Task PipeReaderCompletesUponPipeCompleteAsync(Type type)
[TestCase(Type.Tcp)]
[TestCase(Type.TcpTls)]
[TestCase(Type.Quic)]
[Repeat(100)]
public async Task PipeWriterCompletesUponCompleteAsync(Type type)
{
var (_, sNexus, _, cNexus, tcs) = await Setup(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public async Task PipeReaderReceivesDataMultipleTimes(Type type)
int count = 0;

// Ensure that the ids will properly wrap around.
const int iterations = 1000;
const int iterations = 400;
sNexus.ServerTaskValueWithDuplexPipeEvent = async (nexus, pipe) =>
{
var result = await pipe.Input.ReadAsync();
Expand All @@ -34,14 +34,15 @@ public async Task PipeReaderReceivesDataMultipleTimes(Type type)

for (int i = 0; i < iterations; i++)
{
await Task.Delay(1);
await using var pipe = cNexus.Context.CreatePipe();
await cNexus.Context.Proxy.ServerTaskValueWithDuplexPipe(pipe);
await pipe.ReadyTask;
await pipe.Output.WriteAsync(Data);
}


await tcs.Task.Timeout(10);
await tcs.Task.Timeout(20);
}

[TestCase(Type.Uds)]
Expand Down Expand Up @@ -118,7 +119,6 @@ public async Task PipeReaderCompletesUponCompleteAsync(Type type)
[TestCase(Type.Tcp)]
[TestCase(Type.TcpTls)]
[TestCase(Type.Quic)]
[Repeat(100)]
public async Task PipeWriterCompletesUponCompleteAsync(Type type)
{
//Console.WriteLine("Starting test");
Expand Down

0 comments on commit cc7ae1f

Please sign in to comment.