Skip to content

Commit

Permalink
Speed up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Nov 6, 2024
1 parent 7a28554 commit acd2949
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static async Task<int> CountNumberOfMessages(Socket socket, CancellationToken to
ReceiveResult? result = await stream.ReceiveAsync(buffer);

// Imitate random delays
if (Stopwatch.GetTimestamp() % 1001 == 0)
if (Stopwatch.GetTimestamp() % 101 == 0)
await Task.Delay(1);

if (result is not null && IsEndOfIpcMessage(result))
Expand Down Expand Up @@ -128,7 +128,7 @@ static async Task<int> CountNumberOfMessages(Socket socket, CancellationToken to

for (int i = 0; i < messageCount; i++)
{
using JsonRpcResult result = JsonRpcResult.Single(RandomSuccessResponse(1000, () => disposeCount++), default);
using JsonRpcResult result = JsonRpcResult.Single(RandomSuccessResponse(100, () => disposeCount++), default);
await client.SendJsonRpcResult(result);
await Task.Delay(1);
}
Expand Down

0 comments on commit acd2949

Please sign in to comment.