Skip to content

Commit

Permalink
Trying to fix flaky TestRampingArrivalRateRunUnplannedVUs
Browse files Browse the repository at this point in the history
part of #1357
  • Loading branch information
mstoykov committed Jul 20, 2020
1 parent 5cb5ce8 commit 06bcf37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/executor/ramping_arrival_rate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,19 @@ func TestRampingArrivalRateRunUnplannedVUs(t *testing.T) {
},
es, runner)
defer cancel()
var engineOut = make(chan stats.SampleContainer, 1000)
engineOut := make(chan stats.SampleContainer, 1000)
es.SetInitVUFunc(func(_ context.Context, logger *logrus.Entry) (lib.InitializedVU, error) {
cur := atomic.LoadInt64(&count)
require.Equal(t, cur, int64(1))
time.Sleep(time.Second / 2)

close(ch)
time.Sleep(time.Millisecond * 50)
time.Sleep(time.Millisecond * 150)

cur = atomic.LoadInt64(&count)
require.Equal(t, cur, int64(2))

time.Sleep(time.Millisecond * 50)
time.Sleep(time.Millisecond * 150)
cur = atomic.LoadInt64(&count)
require.Equal(t, cur, int64(2))

Expand Down

0 comments on commit 06bcf37

Please sign in to comment.