diff --git a/tests/IceRpc.Tests/Transports/Slic/SlicTransportTests.cs b/tests/IceRpc.Tests/Transports/Slic/SlicTransportTests.cs index fc1f181e6..673f66301 100644 --- a/tests/IceRpc.Tests/Transports/Slic/SlicTransportTests.cs +++ b/tests/IceRpc.Tests/Transports/Slic/SlicTransportTests.cs @@ -588,8 +588,9 @@ public async Task Connection_with_idle_timeout_is_not_aborted_when_idle([Values] Assert.That(async () => await acceptStreamTask, Throws.InstanceOf()); } - /// Verifies that setting the idle timeout doesn't abort the connection when there is slow write activity - /// from client to server. + /// Verifies that setting the idle timeout doesn't abort the connection even when there is slow write + /// activity from client to server. This slow write-only activity could possibly prevent the sending of Ping frames + /// from the client to the server, or prevent the server from reading these Ping frames. [Test] [NonParallelizable] public async Task Connection_with_idle_timeout_and_slow_write_is_not_aborted([Values] bool serverIdleTimeout) @@ -626,7 +627,12 @@ public async Task Connection_with_idle_timeout_and_slow_write_is_not_aborted([Va // Assert Assert.That(acceptStreamTask.IsCompleted, Is.True); - Assert.That(nextAcceptStreamTask.IsCompleted, Is.False); + if (nextAcceptStreamTask.IsCompleted) + { + // Unexpected. See #4108. + Assert.DoesNotThrowAsync(async () => await nextAcceptStreamTask); + Assert.Fail("nextAcceptStreamTask should not be completed"); + } await sut.Client.CloseAsync(MultiplexedConnectionCloseError.NoError, default); Assert.That(async () => await nextAcceptStreamTask, Throws.InstanceOf()); }