File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
quic/s2n-quic-tests/src/tests Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,31 @@ fn mtu_updates<S: tls::Provider, C: tls::Provider>(
9898 . with_tls ( client) ?
9999 . start ( ) ?;
100100 let addr = start_server ( server) ?;
101- // we need a large payload to allow for multiple rounds of MTU probing
102- start_client ( client, addr, Data :: new ( 70_000_000 ) ) ?;
101+
102+ primary:: spawn ( async move {
103+ let connect = Connect :: new ( addr) . with_server_name ( "localhost" ) ;
104+ let mut connection = client. connect ( connect) . await . unwrap ( ) ;
105+
106+ tracing:: debug!( "connected with client connection: {}" , connection. id( ) ) ;
107+
108+ let stream = connection. open_bidirectional_stream ( ) . await . unwrap ( ) ;
109+ tracing:: debug!( "opened client stream: {}" , stream. id( ) ) ;
110+
111+ let ( mut recv, mut send) = stream. split ( ) ;
112+
113+ // 50 roundtrips is enough for MTU probing completion
114+ primary:: spawn ( async move {
115+ for _ in 0 ..50 {
116+ tracing:: debug!( "client sending ping" ) ;
117+ send. send ( "ping" . into ( ) ) . await . unwrap ( ) ;
118+ if let Some ( chunk) = recv. receive ( ) . await . unwrap ( ) {
119+ assert ! ( chunk == "ping" ) ;
120+ tracing:: debug!( "received ping from server" ) ;
121+ }
122+ }
123+ } ) ;
124+ } ) ;
125+
103126 Ok ( addr)
104127 } )
105128 . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments