Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Apr 15, 2024
1 parent 340c58c commit 6896575
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions server/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3476,10 +3476,14 @@ func TestStoreOverloadedWithReplace(t *testing.T) {
re.False(oc.AddOperator(op3))
ops, _ := lb.Schedule(tc, false /* dryRun */)
re.Empty(ops)
// sleep 2 seconds to make sure that token is filled up
time.Sleep(2 * time.Second)
ops, _ = lb.Schedule(tc, false /* dryRun */)
re.NotEmpty(ops)
// make sure that token is filled up
testutil.Eventually(re, func() bool {
ops, _ = lb.Schedule(tc, false /* dryRun */)
if len(ops) == 0 {
return false
}
return true
})

Check failure on line 3486 in server/cluster/cluster_test.go

View workflow job for this annotation

GitHub Actions / statics

S1008: should use 'return len(ops) != 0' instead of 'if len(ops) == 0 { return false }; return true' (gosimple)
}

func TestDownStoreLimit(t *testing.T) {
Expand Down

0 comments on commit 6896575

Please sign in to comment.