Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ public async Task ConnectionsCountForAPollingSubscriptionChangesOneConnectionAtA

await Try.CatchingError(() => echo.SayHelloAsync("hello"));

var closeFirstConnection = connectionsObserver.ConnectionsCountChangedForSubscription.Skip(1).First();
closeFirstConnection.PreviousCount.Should().Be(1);
closeFirstConnection.CurrentCount.Should().Be(0);
closeFirstConnection.SubscriptionId.Should().Be(clientAndService.ServiceUri);
// The failed request is completed before the server releases the connection lease, so the close may not be observed yet.
Wait.UntilActionSucceeds(() =>
{
var closeFirstConnection = connectionsObserver.ConnectionsCountChangedForSubscription.Skip(1).First();
closeFirstConnection.PreviousCount.Should().Be(1);
closeFirstConnection.CurrentCount.Should().Be(0);
closeFirstConnection.SubscriptionId.Should().Be(clientAndService.ServiceUri);
}, TimeSpan.FromSeconds(30), Logger, CancellationToken);

await echo.SayHelloAsync("hello");

Expand Down