@@ -20,7 +20,6 @@ import (
20
20
"context"
21
21
"fmt"
22
22
"io"
23
- "io/ioutil"
24
23
"log"
25
24
"net"
26
25
"net/http"
@@ -119,7 +118,7 @@ func TestRecordMetricsForNonExistingOperation(t *testing.T) {
119
118
if err != nil || rsp .StatusCode != http .StatusOK {
120
119
t .Errorf ("failed to get response from server %v, %v" , err , rsp )
121
120
}
122
- r , err := ioutil .ReadAll (rsp .Body )
121
+ r , err := io .ReadAll (rsp .Body )
123
122
if err != nil {
124
123
t .Errorf ("failed to read response body %v" , err )
125
124
}
@@ -144,7 +143,7 @@ func TestDropOperation(t *testing.T) {
144
143
if err != nil || rsp .StatusCode != http .StatusOK {
145
144
t .Errorf ("failed to get response from server %v, %v" , err , rsp )
146
145
}
147
- r , err := ioutil .ReadAll (rsp .Body )
146
+ r , err := io .ReadAll (rsp .Body )
148
147
if err != nil {
149
148
t .Errorf ("failed to read response body %v" , err )
150
149
}
@@ -554,7 +553,7 @@ func verifyInFlightMetric(expected string, srvAddr string) error {
554
553
if rsp .StatusCode != http .StatusOK {
555
554
return fmt .Errorf ("failed to get response from serve: %s" , http .StatusText (rsp .StatusCode ))
556
555
}
557
- r , err := ioutil .ReadAll (rsp .Body )
556
+ r , err := io .ReadAll (rsp .Body )
558
557
if err != nil {
559
558
return err
560
559
}
@@ -574,7 +573,7 @@ func verifyMetric(expected, srvAddr string) error {
574
573
if rsp .StatusCode != http .StatusOK {
575
574
return fmt .Errorf ("failed to get response from serve: %s" , http .StatusText (rsp .StatusCode ))
576
575
}
577
- r , err := ioutil .ReadAll (rsp .Body )
576
+ r , err := io .ReadAll (rsp .Body )
578
577
if err != nil {
579
578
return err
580
579
}
0 commit comments