make TestStepShutdown_shutdownDelay less strict on schedule

This commit is contained in:
Adrien Delorme 2018-10-17 12:23:01 +02:00
parent af3b818de0
commit 410bee0666
2 changed files with 2 additions and 2 deletions

View File

@ -21,6 +21,7 @@ func testConfig() map[string]interface{} {
"iso_url": "http://www.packer.io", "iso_url": "http://www.packer.io",
"shutdown_command": "yes", "shutdown_command": "yes",
"ssh_username": "foo", "ssh_username": "foo",
"switch_name": "switch", // to avoid using builder.detectSwitchName which can lock down in travis-ci
"ram_size": 64, "ram_size": 64,
"guest_additions_mode": "none", "guest_additions_mode": "none",
"clone_from_vmcx_path": "generated", "clone_from_vmcx_path": "generated",
@ -231,7 +232,6 @@ func TestBuilderPrepare_ISOChecksumType(t *testing.T) {
// Test good // Test good
config["iso_checksum_type"] = "mD5" config["iso_checksum_type"] = "mD5"
config["switch_name"] = "switch" // to avoid using builder.detectSwitchName which can lock down in CI mode
b = Builder{} b = Builder{}
warns, err = b.Prepare(config) warns, err = b.Prepare(config)
if len(warns) > 0 { if len(warns) > 0 {

View File

@ -134,7 +134,7 @@ func TestStepShutdown_shutdownDelay(t *testing.T) {
t.Fatalf("bad action: %#v", action) t.Fatalf("bad action: %#v", action)
} }
testDuration := time.Since(start) testDuration := time.Since(start)
if testDuration < 2500*time.Millisecond || testDuration > 2600*time.Millisecond { if testDuration < 2500*time.Millisecond || testDuration > 2700*time.Millisecond {
t.Fatalf("incorrect duration %s", testDuration) t.Fatalf("incorrect duration %s", testDuration)
} }