@@ -67,7 +67,7 @@ public async Task RunTlsClientHelloCallbackTest_DeterministinglyReads()
6767 {
6868 nextMiddlewareInvoked = true ;
6969 var readResult = ctx . Transport . Input . ReadAsync ( ) ;
70- Assert . Equal ( 6 , readResult . Result . Buffer . Length ) ;
70+ Assert . Equal ( 5 , readResult . Result . Buffer . Length ) ;
7171
7272 return Task . CompletedTask ;
7373 } ,
@@ -79,25 +79,20 @@ public async Task RunTlsClientHelloCallbackTest_DeterministinglyReads()
7979
8080 await transportConnection . Input . WriteAsync ( new byte [ 1 ] { 0x16 } ) ;
8181 var middlewareTask = Task . Run ( ( ) => middleware . OnTlsClientHelloAsync ( transportConnection ) ) ;
82- await Task . Delay ( TimeSpan . FromMilliseconds ( 25 ) ) ;
82+ await Task . Delay ( TimeSpan . FromMilliseconds ( 75 ) ) ;
8383
8484 await transportConnection . Input . WriteAsync ( new byte [ 2 ] { 0x03 , 0x01 } ) ;
85- await Task . Delay ( TimeSpan . FromMilliseconds ( 25 ) ) ;
85+ await Task . Delay ( TimeSpan . FromMilliseconds ( 75 ) ) ;
8686
8787 await transportConnection . Input . WriteAsync ( new byte [ 2 ] { 0x00 , 0x20 } ) ;
88- await Task . Delay ( TimeSpan . FromMilliseconds ( 25 ) ) ;
89-
90- // not correct TLS client hello byte;
91- // meaning we will not invoke the callback and advance request processing
92- await transportConnection . Input . WriteAsync ( new byte [ 1 ] { 0x15 } ) ;
93- await Task . Delay ( TimeSpan . FromMilliseconds ( 25 ) ) ;
88+ await Task . Delay ( TimeSpan . FromMilliseconds ( 75 ) ) ;
9489
9590 await transportConnection . Input . CompleteAsync ( ) ;
9691
97- // ensuring that we have read only 5 times (ReadAsync() is called 5 times)
92+ // ensuring that we have read only 4 times (ReadAsync() is called 4 times)
9893 var observableTransport = transportConnection . Transport as ObservableDuplexPipe ;
9994 Assert . NotNull ( observableTransport ) ;
100- Assert . Equal ( 5 , observableTransport . ReadAsyncCounter ) ;
95+ Assert . Equal ( 4 , observableTransport . ReadAsyncCounter ) ;
10196
10297 await middlewareTask ;
10398 Assert . True ( nextMiddlewareInvoked ) ;
0 commit comments