Skip to content

Commit

Permalink
Tweak NoCrossover test to better cover VU reuse scenarios
Browse files Browse the repository at this point in the history
This would previously fail without the fixes in #1453.
  • Loading branch information
Ivan Mirić committed May 18, 2020
1 parent e1a5c0a commit b2b8648
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ func TestExecutionSchedulerRunCustomConfigNoCrossover(t *testing.T) {
type: 'per-vu-iterations',
vus: 1,
iterations: 1,
gracefulStop: '0.5s',
gracefulStop: '0s',
maxDuration: '0.5s',
exec: 's1func',
env: { TESTVAR1: 'scenario1' },
tags: { testtag1: 'scenario1' },
Expand All @@ -412,6 +413,8 @@ func TestExecutionSchedulerRunCustomConfigNoCrossover(t *testing.T) {
vus: 1,
iterations: 1,
gracefulStop: '0.5s',
startTime: '0.5s',
maxDuration: '2s',
exec: 's2func',
env: { TESTVAR2: 'scenario2' },
tags: { testtag2: 'scenario2' },
Expand Down Expand Up @@ -442,6 +445,9 @@ func TestExecutionSchedulerRunCustomConfigNoCrossover(t *testing.T) {
checkVar('TESTVAR3', undefined);
checkVar('TESTGLOBALVAR', 'global');
// Intentionally try to pollute the env
__ENV.TESTVAR2 = 'overridden';
http.get('HTTPBIN_IP_URL/', { tags: { reqtag: 'scenario1' }});
}
Expand Down Expand Up @@ -496,7 +502,7 @@ func TestExecutionSchedulerRunCustomConfigNoCrossover(t *testing.T) {
execScheduler, err := NewExecutionScheduler(runner, logger)
require.NoError(t, err)

ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()

done := make(chan struct{})
Expand Down

0 comments on commit b2b8648

Please sign in to comment.