@@ -154,26 +154,28 @@ public async Task SingleWrite_HeaderFrame_ReservedFrame_DataFrame()
154154 var sut = new Http3Stream ( [ ] ) ;
155155
156156 var clientStream = await quicConnection . ClientConnection . OpenOutboundStreamAsync ( QuicStreamType . Bidirectional , TestContext . Current . CancellationToken ) ;
157- byte [ ] data = [ .. await GetHeadersFrame ( ) , .. GetData ( 30 ) , .. GetReservedFrame ( 750 ) , .. GetData ( 30 ) ] ;
157+ byte [ ] data = [ .. await GetHeadersFrame ( ) , .. GetData ( 30 ) , .. GetReservedFrame ( 750 ) , ..GetData ( 30 ) ] ;
158158 await clientStream . WriteAsync ( data , TestContext . Current . CancellationToken ) ;
159159 await clientStream . FlushAsync ( TestContext . Current . CancellationToken ) ;
160160
161161 TaskCompletionSource tcs = new ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
162162 sut . Initialize ( null , await serverStreamTask ) ;
163- var testApp = new TestBase . TestApplication ( ctx =>
163+ var testApp = new TestBase . TestApplication ( async ctx =>
164164 {
165165 Assert . Equal ( "/" , ctx . Request . Path ) ;
166166 Assert . Equal ( "https" , ctx . Request . Scheme ) ;
167167 Assert . Equal ( "localhost" , ctx . Request . Host . ToString ( ) ) ;
168168 Assert . Equal ( HttpMethod . Get . ToString ( ) , ctx . Request . Method ) ;
169- // TODO: assert data
169+ var content = new MemoryStream ( ) ;
170+ await ctx . Request . BodyReader . CopyToAsync ( content ) ;
171+ Assert . Equal ( 60 , content . Length ) ;
170172 tcs . SetResult ( ) ;
171- return Task . CompletedTask ;
172173 } ) ;
173174 var processing = sut . ProcessStreamAsync ( testApp , TestContext . Current . CancellationToken ) ;
174175
175- await tcs . Task . WaitAsync ( DefaultTimeout , TestContext . Current . CancellationToken ) ;
176176 clientStream . Close ( ) ;
177+ await tcs . Task . WaitAsync ( DefaultTimeout , TestContext . Current . CancellationToken ) ;
178+
177179 await processing ;
178180 await quicConnection . DisposeAsync ( ) ;
179181 }
@@ -186,7 +188,7 @@ public async Task SingleWrite_InOrderFrames_Throw()
186188 var sut = new Http3Stream ( [ ] ) ;
187189
188190 var clientStream = await quicConnection . ClientConnection . OpenOutboundStreamAsync ( QuicStreamType . Bidirectional , TestContext . Current . CancellationToken ) ;
189- byte [ ] data = [ .. GetData ( 30 ) , .. await GetHeadersFrame ( ) ] ; //DATA before HEADERS is in-order
191+ byte [ ] data = [ .. GetData ( 30 ) , .. await GetHeadersFrame ( ) ] ; // DATA before HEADERS is in-order
190192 await clientStream . WriteAsync ( data , TestContext . Current . CancellationToken ) ;
191193 await clientStream . FlushAsync ( TestContext . Current . CancellationToken ) ;
192194
0 commit comments