@@ -139,7 +139,7 @@ async fn grpc() {
139139 ) ;
140140
141141 info ! ( "Verifying that we see the successful response" ) ;
142- let mut rsp = time:: timeout (
142+ let ( parts , mut body ) = time:: timeout (
143143 TIMEOUT * 4 ,
144144 send_req (
145145 svc. clone ( ) ,
@@ -155,17 +155,18 @@ async fn grpc() {
155155 )
156156 . await
157157 . expect ( "response" )
158- . expect ( "response" ) ;
159- assert_eq ! ( rsp. status( ) , StatusCode :: OK ) ;
160- while let Some ( res) = rsp. body_mut ( ) . data ( ) . await {
161- res. expect ( "data" ) ;
162- }
163- let trailers = rsp
164- . body_mut ( )
165- . trailers ( )
158+ . expect ( "response" )
159+ . map ( linkerd_http_body_compat:: ForwardCompatibleBody :: new)
160+ . into_parts ( ) ;
161+ assert_eq ! ( parts. status, StatusCode :: OK ) ;
162+ let trailers = body
163+ . frame ( )
166164 . await
167- . expect ( "trailers" )
168- . expect ( "trailers" ) ;
165+ . expect ( "a result" )
166+ . expect ( "a frame" )
167+ . into_trailers ( )
168+ . ok ( )
169+ . expect ( "trailers frame" ) ;
169170 assert_eq ! (
170171 trailers
171172 . get( "grpc-status" )
@@ -214,7 +215,7 @@ async fn grpc_requires_allow() {
214215 ) ;
215216
216217 info ! ( "Verifying that we see the successful response" ) ;
217- let mut rsp = time:: timeout (
218+ let ( parts , mut body ) = time:: timeout (
218219 TIMEOUT * 4 ,
219220 send_req (
220221 svc. clone ( ) ,
@@ -230,17 +231,18 @@ async fn grpc_requires_allow() {
230231 )
231232 . await
232233 . expect ( "response" )
233- . expect ( "response" ) ;
234- assert_eq ! ( rsp. status( ) , StatusCode :: OK ) ;
235- while let Some ( res) = rsp. body_mut ( ) . data ( ) . await {
236- res. expect ( "data" ) ;
237- }
238- let trailers = rsp
239- . body_mut ( )
240- . trailers ( )
234+ . expect ( "response" )
235+ . map ( linkerd_http_body_compat:: ForwardCompatibleBody :: new)
236+ . into_parts ( ) ;
237+ assert_eq ! ( parts. status, StatusCode :: OK ) ;
238+ let trailers = body
239+ . frame ( )
241240 . await
242- . expect ( "trailers" )
243- . expect ( "trailers" ) ;
241+ . expect ( "a result" )
242+ . expect ( "a frame" )
243+ . into_trailers ( )
244+ . ok ( )
245+ . expect ( "trailers frame" ) ;
244246 assert_eq ! (
245247 trailers
246248 . get( "grpc-status" )
0 commit comments