File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/SignalR/common/Http.Connections/test Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1051,9 +1051,20 @@ public async Task RequestToActiveConnectionIdKillsPreviousConnectionLongPolling(
1051
1051
Assert . True ( request1 . IsCompleted ) ;
1052
1052
1053
1053
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 ;
1054
1060
var request2 = dispatcher . ExecuteAsync ( context2 , options , app ) ;
1055
1061
1056
1062
await request1 ;
1063
+ // Wait until the second request has started internally
1064
+ while ( connection . TransportTask . IsCompleted )
1065
+ {
1066
+ await Task . Delay ( 1 ) ;
1067
+ }
1057
1068
1058
1069
Assert . Equal ( StatusCodes . Status204NoContent , context1 . Response . StatusCode ) ;
1059
1070
Assert . Equal ( HttpConnectionStatus . Active , connection . Status ) ;
You can’t perform that action at this time.
0 commit comments