@@ -199,7 +199,7 @@ async fn http1_bad_gateway_meshed_response_error_header() {
199
199
let cfg = default_config ( ) ;
200
200
let ( rt, _shutdown) = runtime ( ) ;
201
201
let server = build_server ( cfg, rt, profiles, connect) . new_service ( Target :: meshed_http1 ( ) ) ;
202
- let ( client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
202
+ let ( mut client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
203
203
204
204
// Send a request and assert that it is a BAD_GATEWAY with the expected
205
205
// header message.
@@ -209,7 +209,7 @@ async fn http1_bad_gateway_meshed_response_error_header() {
209
209
. body ( Body :: default ( ) )
210
210
. unwrap ( ) ;
211
211
let rsp = client
212
- . oneshot ( req)
212
+ . send_request ( req)
213
213
. await
214
214
. expect ( "HTTP client request failed" ) ;
215
215
tracing:: info!( ?rsp) ;
@@ -380,17 +380,15 @@ async fn h2_response_meshed_error_header() {
380
380
let connect = support:: connect ( ) . endpoint_fn_boxed ( Target :: addr ( ) , connect_error ( ) ) ;
381
381
382
382
// Build a client using the connect that always errors.
383
- #[ allow( deprecated) ] // linkerd/linkerd2#8733
384
- let mut client = hyper:: client:: conn:: Builder :: new ( ) ;
385
- client. http2_only ( true ) ;
383
+ let mut client = hyper:: client:: conn:: http2:: Builder :: new ( TracingExecutor ) ;
386
384
let profiles = profile:: resolver ( ) ;
387
385
let profile_tx =
388
386
profiles. profile_tx ( NameAddr :: from_str_and_port ( "foo.svc.cluster.local" , 5550 ) . unwrap ( ) ) ;
389
387
profile_tx. send ( profile:: Profile :: default ( ) ) . unwrap ( ) ;
390
388
let cfg = default_config ( ) ;
391
389
let ( rt, _shutdown) = runtime ( ) ;
392
390
let server = build_server ( cfg, rt, profiles, connect) . new_service ( Target :: meshed_h2 ( ) ) ;
393
- let ( client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
391
+ let ( mut client, bg) = http_util:: connect_and_accept_http2 ( & mut client, server) . await ;
394
392
395
393
// Send a request and assert that it is SERVICE_UNAVAILABLE with the
396
394
// expected header message.
@@ -400,7 +398,7 @@ async fn h2_response_meshed_error_header() {
400
398
. body ( Body :: default ( ) )
401
399
. unwrap ( ) ;
402
400
let rsp = client
403
- . oneshot ( req)
401
+ . send_request ( req)
404
402
. await
405
403
. expect ( "HTTP client request failed" ) ;
406
404
tracing:: info!( ?rsp) ;
@@ -422,17 +420,15 @@ async fn h2_response_unmeshed_error_header() {
422
420
let connect = support:: connect ( ) . endpoint_fn_boxed ( Target :: addr ( ) , connect_error ( ) ) ;
423
421
424
422
// Build a client using the connect that always errors.
425
- #[ allow( deprecated) ] // linkerd/linkerd2#8733
426
- let mut client = hyper:: client:: conn:: Builder :: new ( ) ;
427
- client. http2_only ( true ) ;
423
+ let mut client = hyper:: client:: conn:: http2:: Builder :: new ( TracingExecutor ) ;
428
424
let profiles = profile:: resolver ( ) ;
429
425
let profile_tx =
430
426
profiles. profile_tx ( NameAddr :: from_str_and_port ( "foo.svc.cluster.local" , 5550 ) . unwrap ( ) ) ;
431
427
profile_tx. send ( profile:: Profile :: default ( ) ) . unwrap ( ) ;
432
428
let cfg = default_config ( ) ;
433
429
let ( rt, _shutdown) = runtime ( ) ;
434
430
let server = build_server ( cfg, rt, profiles, connect) . new_service ( Target :: UNMESHED_H2 ) ;
435
- let ( client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
431
+ let ( mut client, bg) = http_util:: connect_and_accept_http2 ( & mut client, server) . await ;
436
432
437
433
// Send a request and assert that it is SERVICE_UNAVAILABLE with the
438
434
// expected header message.
@@ -442,7 +438,7 @@ async fn h2_response_unmeshed_error_header() {
442
438
. body ( Body :: default ( ) )
443
439
. unwrap ( ) ;
444
440
let rsp = client
445
- . oneshot ( req)
441
+ . send_request ( req)
446
442
. await
447
443
. expect ( "HTTP client request failed" ) ;
448
444
tracing:: info!( ?rsp) ;
@@ -466,17 +462,15 @@ async fn grpc_meshed_response_error_header() {
466
462
let connect = support:: connect ( ) . endpoint_fn_boxed ( Target :: addr ( ) , connect_error ( ) ) ;
467
463
468
464
// Build a client using the connect that always errors.
469
- #[ allow( deprecated) ] // linkerd/linkerd2#8733
470
- let mut client = hyper:: client:: conn:: Builder :: new ( ) ;
471
- client. http2_only ( true ) ;
465
+ let mut client = hyper:: client:: conn:: http2:: Builder :: new ( TracingExecutor ) ;
472
466
let profiles = profile:: resolver ( ) ;
473
467
let profile_tx =
474
468
profiles. profile_tx ( NameAddr :: from_str_and_port ( "foo.svc.cluster.local" , 5550 ) . unwrap ( ) ) ;
475
469
profile_tx. send ( profile:: Profile :: default ( ) ) . unwrap ( ) ;
476
470
let cfg = default_config ( ) ;
477
471
let ( rt, _shutdown) = runtime ( ) ;
478
472
let server = build_server ( cfg, rt, profiles, connect) . new_service ( Target :: meshed_h2 ( ) ) ;
479
- let ( client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
473
+ let ( mut client, bg) = http_util:: connect_and_accept_http2 ( & mut client, server) . await ;
480
474
481
475
// Send a request and assert that it is OK with the expected header
482
476
// message.
@@ -487,7 +481,7 @@ async fn grpc_meshed_response_error_header() {
487
481
. body ( Body :: default ( ) )
488
482
. unwrap ( ) ;
489
483
let rsp = client
490
- . oneshot ( req)
484
+ . send_request ( req)
491
485
. await
492
486
. expect ( "HTTP client request failed" ) ;
493
487
tracing:: info!( ?rsp) ;
@@ -509,17 +503,15 @@ async fn grpc_unmeshed_response_error_header() {
509
503
let connect = support:: connect ( ) . endpoint_fn_boxed ( Target :: addr ( ) , connect_error ( ) ) ;
510
504
511
505
// Build a client using the connect that always errors.
512
- #[ allow( deprecated) ] // linkerd/linkerd2#8733
513
- let mut client = hyper:: client:: conn:: Builder :: new ( ) ;
514
- client. http2_only ( true ) ;
506
+ let mut client = hyper:: client:: conn:: http2:: Builder :: new ( TracingExecutor ) ;
515
507
let profiles = profile:: resolver ( ) ;
516
508
let profile_tx =
517
509
profiles. profile_tx ( NameAddr :: from_str_and_port ( "foo.svc.cluster.local" , 5550 ) . unwrap ( ) ) ;
518
510
profile_tx. send ( profile:: Profile :: default ( ) ) . unwrap ( ) ;
519
511
let cfg = default_config ( ) ;
520
512
let ( rt, _shutdown) = runtime ( ) ;
521
513
let server = build_server ( cfg, rt, profiles, connect) . new_service ( Target :: UNMESHED_H2 ) ;
522
- let ( client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
514
+ let ( mut client, bg) = http_util:: connect_and_accept_http2 ( & mut client, server) . await ;
523
515
524
516
// Send a request and assert that it is OK with the expected header
525
517
// message.
@@ -530,7 +522,7 @@ async fn grpc_unmeshed_response_error_header() {
530
522
. body ( Body :: default ( ) )
531
523
. unwrap ( ) ;
532
524
let rsp = client
533
- . oneshot ( req)
525
+ . send_request ( req)
534
526
. await
535
527
. expect ( "HTTP client request failed" ) ;
536
528
tracing:: info!( ?rsp) ;
@@ -560,9 +552,7 @@ async fn grpc_response_class() {
560
552
} ;
561
553
562
554
// Build a client using the connect that always errors.
563
- #[ allow( deprecated) ] // linkerd/linkerd2#8733
564
- let mut client = hyper:: client:: conn:: Builder :: new ( ) ;
565
- client. http2_only ( true ) ;
555
+ let mut client = hyper:: client:: conn:: http2:: Builder :: new ( TracingExecutor ) ;
566
556
let profiles = profile:: resolver ( ) ;
567
557
let profile_tx =
568
558
profiles. profile_tx ( NameAddr :: from_str_and_port ( "foo.svc.cluster.local" , 5550 ) . unwrap ( ) ) ;
@@ -575,7 +565,7 @@ async fn grpc_response_class() {
575
565
. http_endpoint
576
566
. into_report ( time:: Duration :: from_secs ( 3600 ) ) ;
577
567
let server = build_server ( cfg, rt, profiles, connect) . new_service ( Target :: meshed_h2 ( ) ) ;
578
- let ( client, bg) = http_util:: connect_and_accept ( & mut client, server) . await ;
568
+ let ( mut client, bg) = http_util:: connect_and_accept_http2 ( & mut client, server) . await ;
579
569
580
570
// Send a request and assert that it is OK with the expected header
581
571
// message.
@@ -587,7 +577,7 @@ async fn grpc_response_class() {
587
577
. unwrap ( ) ;
588
578
589
579
let mut rsp = client
590
- . oneshot ( req)
580
+ . send_request ( req)
591
581
. await
592
582
. expect ( "HTTP client request failed" ) ;
593
583
tracing:: info!( ?rsp) ;
0 commit comments