Skip to content

Commit

Permalink
pass lint
Browse files Browse the repository at this point in the history
Signed-off-by: bufferflies <[email protected]>
  • Loading branch information
bufferflies committed Jan 19, 2024
1 parent 1d876f1 commit c492f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/client/client_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (a *batchConn) getClientAndSend() {
}
}
if cli == nil {
logutil.BgLogger().Warn("no available connections", zap.String("target", target), zap.String("reason", reason))
logutil.BgLogger().Info("no available connections", zap.String("target", target), zap.String("reason", reason))
metrics.TiKVNoAvailableConnectionCounter.Inc()
return
}
Expand Down
5 changes: 3 additions & 2 deletions internal/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ func TestPrioritySentLimit(t *testing.T) {
wait := sync.WaitGroup{}
bench := 10
wait.Add(bench * 2)
ctx, _ := context.WithTimeout(context.Background(), time.Second*10)
ctx, cancelFn := context.WithTimeout(context.Background(), time.Second*10)
defer cancelFn()
sendFn := func(pri uint64, dur *atomic.Int64, qps *atomic.Int64) {
for i := 0; i < bench; i++ {
go func() {
Expand All @@ -777,7 +778,7 @@ func TestPrioritySentLimit(t *testing.T) {
req.ResourceControlContext = &kvrpcpb.ResourceControlContext{OverridePriority: pri}
now := time.Now()
rpcClient.SendRequest(context.Background(), addr, req, 100*time.Millisecond)
dur.Add(time.Now().Sub(now).Milliseconds())
dur.Add(time.Since(now).Microseconds())
qps.Add(1)
select {
case <-ctx.Done():
Expand Down

0 comments on commit c492f4e

Please sign in to comment.