Skip to content

Commit

Permalink
spool: fix unstable test TestPoolTuneScaleUpAndDown (#42187)
Browse files Browse the repository at this point in the history
close #42163
  • Loading branch information
hawkingrei authored Mar 14, 2023
1 parent 7be0e9b commit 56e3c34
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions resourcemanager/pool/spool/spool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestPoolTuneScaleUpAndDown(t *testing.T) {
}()
}
p.Tune(8)
time.Sleep(500 * time.Millisecond)
wg.Wait()
if n := p.Running(); n != 8 {
t.Errorf("expect 8 workers running, but got %d", n)
}
Expand All @@ -119,7 +119,6 @@ func TestPoolTuneScaleUpAndDown(t *testing.T) {
cnt.Add(1)
}
fnChan := make(chan func(), 10)
wg.Wait()
err := p.RunWithConcurrency(fnChan, 2)
require.NoError(t, err)
require.Equal(t, int32(2), p.Running())
Expand Down

0 comments on commit 56e3c34

Please sign in to comment.