Skip to content

Commit

Permalink
Improve Slic slow write test
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Nov 14, 2024
1 parent bcec78b commit fbd7f8a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/IceRpc.Tests/Transports/Slic/SlicTransportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,9 @@ public async Task Connection_with_idle_timeout_is_not_aborted_when_idle([Values]
Assert.That(async () => await acceptStreamTask, Throws.InstanceOf<IceRpcException>());
}

/// <summary>Verifies that setting the idle timeout doesn't abort the connection when there is slow write activity
/// from client to server.</summary>
/// <summary>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.</summary>
[Test]
[NonParallelizable]
public async Task Connection_with_idle_timeout_and_slow_write_is_not_aborted([Values] bool serverIdleTimeout)
Expand Down Expand Up @@ -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<IceRpcException>());
}
Expand Down

0 comments on commit fbd7f8a

Please sign in to comment.