Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Slic slow write test #4110

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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