Skip QEMU graceful shutdown test except on Travis
Hopefully we can reuse the SkipSlow helper elsewhere.
This commit is contained in:
parent
24d060bbb4
commit
0ac43a7622
|
@ -125,12 +125,14 @@ func TestQemuDriver_StartOpen_Wait(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestQemuDriver_GracefulShutdown(t *testing.T) {
|
||||
logger := testLogger()
|
||||
testutil.SkipSlow(t)
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
ctestutils.QemuCompatible(t)
|
||||
|
||||
logger := testLogger()
|
||||
|
||||
// Graceful shutdown may be really slow unfortunately
|
||||
killTimeout := 3 * time.Minute
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ if [ "$RUN_STATIC_CHECKS" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
make test
|
||||
NOMAD_SLOW_TEST=1 make test
|
||||
TEST_OUTPUT=$?
|
||||
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package testutil
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
testing "github.com/mitchellh/go-testing-interface"
|
||||
)
|
||||
|
||||
// SkipSlow skips a slow test unless the NOMAD_SLOW_TEST environment variable
|
||||
// is set.
|
||||
func SkipSlow(t testing.T) {
|
||||
if os.Getenv("NOMAD_SLOW_TEST") == "" {
|
||||
t.Skip("Skipping slow test. Set NOMAD_SLOW_TEST=1 to run.")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue