diff --git a/src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecoratorTest.java b/src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecoratorTest.java index 74b4145999..8a47b4ea46 100644 --- a/src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecoratorTest.java +++ b/src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecoratorTest.java @@ -170,8 +170,8 @@ public void testCommandExecution() throws Exception { } assertEquals("Not all threads finished successfully", t.length, results.size()); for (ProcReturn r : results) { + assertEquals("Command didn't complete in time or failed", 0, r.exitCode); assertTrue("Output should contain pid: " + r.output, PID_PATTERN.matcher(r.output).find()); - assertEquals(0, r.exitCode); assertFalse(r.proc.isAlive()); } } @@ -385,7 +385,7 @@ private ProcReturn execCommandInContainer(String containerName, Node node, boole Thread.sleep(100); } assertFalse("proc is alive", proc.isAlive()); - int exitCode = proc.joinWithTimeout(10, TimeUnit.SECONDS, StreamTaskListener.fromStderr()); + int exitCode = proc.joinWithTimeout(20, TimeUnit.SECONDS, StreamTaskListener.fromStderr()); return new ProcReturn(proc, exitCode, out.toString()); }