From acd29497f85e86daf227a4bc7461872775b73116 Mon Sep 17 00:00:00 2001 From: Ruben Buniatyan Date: Wed, 6 Nov 2024 22:03:34 +0100 Subject: [PATCH] Speed up tests --- .../Nethermind.JsonRpc.Test/JsonRpcSocketsClientTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcSocketsClientTests.cs b/src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcSocketsClientTests.cs index 08e984da27d..e9640899c9b 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcSocketsClientTests.cs +++ b/src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcSocketsClientTests.cs @@ -83,7 +83,7 @@ static async Task 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)) @@ -128,7 +128,7 @@ static async Task 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); }