Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: zyguan <[email protected]>
  • Loading branch information
zyguan committed Jan 15, 2025
1 parent 593cc0b commit 3001a0d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions internal/client/metrics_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,13 @@ func TestNetworkCollectorOnReq(t *testing.T) {
reqs := []*tikvrpc.Request{
tikvrpc.NewRequest(
tikvrpc.CmdGet,
&kvrpcpb.GetRequest{Key: []byte("key")},
kvrpcpb.Context{
BusyThresholdMs: 50,
},
&kvrpcpb.GetRequest{Context: &kvrpcpb.Context{BusyThresholdMs: 50}, Key: []byte("key")},
),
tikvrpc.NewReplicaReadRequest(
tikvrpc.CmdGet,
&kvrpcpb.GetRequest{Key: []byte("key")},
&kvrpcpb.GetRequest{Context: &kvrpcpb.Context{StaleRead: true}, Key: []byte("key")},
kv.ReplicaReadFollower,
nil,
kvrpcpb.Context{
StaleRead: true,
},
),
}

Expand All @@ -58,12 +52,12 @@ func TestNetworkCollectorOnReq(t *testing.T) {
req *tikvrpc.Request
}{
{
expectUnpackedBytesSentKV: 8,
expectUnpackedBytesSentKV: 10,
expectUnpackedBytesSentKVCrossZone: 0,
req: reqs[0],
},
{
expectUnpackedBytesSentKV: 18,
expectUnpackedBytesSentKV: 20,
expectUnpackedBytesSentKVCrossZone: 0,
req: reqs[1],
},
Expand Down

0 comments on commit 3001a0d

Please sign in to comment.