Skip to content

Commit

Permalink
Merge pull request #1568 from loadimpact/flakyTestFixesPart2
Browse files Browse the repository at this point in the history
part of #1357
  • Loading branch information
mstoykov authored Jul 22, 2020
2 parents 73d5ee7 + f1090b8 commit 5ff4a76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions lib/executor/constant_arrival_rate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ func TestConstantArrivalRateDroppedIterations(t *testing.T) {
config := &ConstantArrivalRateConfig{
BaseConfig: BaseConfig{GracefulStop: types.NullDurationFrom(0 * time.Second)},
TimeUnit: types.NullDurationFrom(time.Second),
Rate: null.IntFrom(20),
Rate: null.IntFrom(10),
Duration: types.NullDurationFrom(990 * time.Millisecond),
PreAllocatedVUs: null.IntFrom(10),
MaxVUs: null.IntFrom(10),
PreAllocatedVUs: null.IntFrom(5),
MaxVUs: null.IntFrom(5),
}

es := lib.NewExecutionState(lib.Options{}, et, 10, 50)
Expand All @@ -329,6 +329,6 @@ func TestConstantArrivalRateDroppedIterations(t *testing.T) {
logs := logHook.Drain()
require.Len(t, logs, 1)
assert.Contains(t, logs[0].Message, "cannot initialize more")
assert.Equal(t, int64(10), count)
assert.Equal(t, float64(10), sumMetricValues(engineOut, metrics.DroppedIterations.Name))
assert.Equal(t, int64(5), count)
assert.Equal(t, float64(5), sumMetricValues(engineOut, metrics.DroppedIterations.Name))
}
2 changes: 1 addition & 1 deletion lib/executor/ramping_arrival_rate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func TestRampingArrivalRateRunUnplannedVUs(t *testing.T) {
require.Equal(t, cur, int64(2))

close(ch2)
time.Sleep(time.Millisecond * 100)
time.Sleep(time.Millisecond * 200)
cur = atomic.LoadInt64(&count)
require.NotEqual(t, cur, int64(2))
return runner.NewVU(int64(es.GetUniqueVUIdentifier()), engineOut)
Expand Down
4 changes: 2 additions & 2 deletions lib/executor/vu_handle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ func TestVUHandleSimple(t *testing.T) {
}()
err := vuHandle.start()
require.NoError(t, err)
time.Sleep(time.Millisecond * 5)
time.Sleep(time.Millisecond * 50)
vuHandle.gracefulStop()
time.Sleep(time.Millisecond * 5)
// time.Sleep(time.Millisecond * 5) // No sleep as we want to always not return the VU
err = vuHandle.start()
require.NoError(t, err)
time.Sleep(time.Millisecond * 1500)
Expand Down

0 comments on commit 5ff4a76

Please sign in to comment.