Skip to content

Commit

Permalink
Make test non-parallelizable
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Dec 19, 2024
1 parent b343fc7 commit 435f664
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/IceRpc.Tests/IceIdleTimeoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ public async Task Ice_send_heartbeat_action_is_called()
/// <remarks>This test also verifies that the client idle monitor does not abort the connection when the server
/// does not write anything; it's less interesting since the server always writes a ValidateConnection frame after
/// accepting the connection from the client.</remarks>
[Test]
[Test][NonParallelizable]
public async Task Server_idle_monitor_does_not_abort_connection_when_client_does_not_write_anything()
{
var connectionOptions = new ConnectionOptions
{
// We need a fairly long timeout since these tests run in parallel.
IceIdleTimeout = TimeSpan.FromMilliseconds(200)
IceIdleTimeout = TimeSpan.FromMilliseconds(100)
};

await using ServiceProvider provider = new ServiceCollection()
Expand All @@ -105,7 +104,7 @@ public async Task Server_idle_monitor_does_not_abort_connection_when_client_does
(Task clientShutdownRequested, Task serverShutdownRequested) = await sut.ConnectAsync();

// Act
await Task.Delay(TimeSpan.FromMilliseconds(800)); // plenty of time for the idle monitor to kick in.
await Task.Delay(TimeSpan.FromMilliseconds(400)); // plenty of time for the idle monitor to kick in.

// Assert
Assert.That(serverShutdownRequested.IsCompleted, Is.False);
Expand Down

0 comments on commit 435f664

Please sign in to comment.