Skip to content

Commit

Permalink
fix(test): Fix flaky queue integration test (#3382)
Browse files Browse the repository at this point in the history
The test are starting to fail quite frequently with an assertion
failure "Pipeline did not complete".  This is because we assert
that an execution has started within 5 seconds of requesting it,
which appears to fail frequently when running in constrained CPU
environments.

Double the timeout to 10 seconds to alleviate the issue, though
a better fix would probably be to avoid having an arbitrary timeout
at all.  (Perhaps the test function could wait until the queue
is quiescent before proceeding?)
  • Loading branch information
ezimanyi committed Jan 21, 2020
1 parent 9f8e5d8 commit 697722b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ExecutionLatch(private val predicate: Predicate<ExecutionComplete>) :
}
}

fun await() = latch.await(5, TimeUnit.SECONDS)
fun await() = latch.await(10, TimeUnit.SECONDS)
}

fun ConfigurableApplicationContext.runToCompletion(execution: Execution, launcher: (Execution) -> Unit, repository: ExecutionRepository) {
Expand Down

0 comments on commit 697722b

Please sign in to comment.