Skip to content

Commit eaf9311

Browse files
committed
ugh
1 parent 5105a93 commit eaf9311

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/SignalR/common/Http.Connections/test/HttpConnectionDispatcherTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,9 +1051,20 @@ public async Task RequestToActiveConnectionIdKillsPreviousConnectionLongPolling(
10511051
Assert.True(request1.IsCompleted);
10521052

10531053
request1 = dispatcher.ExecuteAsync(context1, options, app);
1054+
// Wait until the request has started internally
1055+
while (connection.TransportTask.IsCompleted)
1056+
{
1057+
await Task.Delay(1);
1058+
}
1059+
var transportTask = connection.TransportTask;
10541060
var request2 = dispatcher.ExecuteAsync(context2, options, app);
10551061

10561062
await request1;
1063+
// Wait until the second request has started internally
1064+
while (connection.TransportTask.IsCompleted)
1065+
{
1066+
await Task.Delay(1);
1067+
}
10571068

10581069
Assert.Equal(StatusCodes.Status204NoContent, context1.Response.StatusCode);
10591070
Assert.Equal(HttpConnectionStatus.Active, connection.Status);

0 commit comments

Comments
 (0)