diff options
author | Valerij Fredriksen <valerijf@oath.com> | 2018-03-15 13:09:21 +0100 |
---|---|---|
committer | Valerij Fredriksen <valerijf@oath.com> | 2018-03-15 13:09:21 +0100 |
commit | 53f858167a81a54b6b16bf46fc58769a62bc5b71 (patch) | |
tree | 9a4e2fbf93a521209fe782ce60e0d44fe72edf56 /node-admin | |
parent | ae2b7dae92b9ba169fe0d0d330509519fd85a6f3 (diff) |
Fix unstable test
Diffstat (limited to 'node-admin')
2 files changed, 11 insertions, 4 deletions
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/CallOrderVerifier.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/CallOrderVerifier.java index 8511c86ed88..0464289101b 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/CallOrderVerifier.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/CallOrderVerifier.java @@ -32,11 +32,19 @@ public class CallOrderVerifier { } public void assertInOrder(String... functionCalls) { - assertInOrderWithAssertMessage("", functionCalls); + assertInOrder(waitForCallOrderTimeout, functionCalls); + } + + public void assertInOrder(long timeout, String... functionCalls) { + assertInOrderWithAssertMessage(timeout, "", functionCalls); } public void assertInOrderWithAssertMessage(String assertMessage, String... functionCalls) { - boolean inOrder = verifyInOrder(waitForCallOrderTimeout, functionCalls); + assertInOrderWithAssertMessage(waitForCallOrderTimeout, assertMessage, functionCalls); + } + + public void assertInOrderWithAssertMessage(long timeout, String assertMessage, String... functionCalls) { + boolean inOrder = verifyInOrder(timeout, functionCalls); if ( ! inOrder && ! assertMessage.isEmpty()) System.err.println(assertMessage); assertTrue(toString(), inOrder); diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerFailTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerFailTest.java index 2c8cea4c8de..e52aeeb419c 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerFailTest.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerFailTest.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.hosted.node.admin.integrationTests; import com.yahoo.vespa.hosted.dockerapi.ContainerName; import com.yahoo.vespa.hosted.dockerapi.DockerImage; import com.yahoo.vespa.hosted.node.admin.ContainerNodeSpec; -import com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl; import com.yahoo.vespa.hosted.provision.Node; import org.junit.Test; @@ -35,7 +34,7 @@ public class DockerFailTest { Thread.sleep(10); } - dockerTester.callOrderVerifier.assertInOrder( + dockerTester.callOrderVerifier.assertInOrder(1200, "createContainerCommand with DockerImage { imageId=dockerImage }, HostName: host1.test.yahoo.com, ContainerName { name=host1 }", "executeInContainerAsRoot with ContainerName { name=host1 }, args: [" + DockerTester.NODE_PROGRAM + ", resume]"); |