New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activiti/Activiti build fails intermittently in Jenkins-X pipelines #2171

igdianov opened this Issue Nov 18, 2018 · 3 comments


2 participants

igdianov commented Nov 18, 2018

Let's troubleshoot to resolve the issue to be able to run automated pull request merges by #2167

@salaboy Please, post the failed test log output here with failed unit tests here for analysis...


This comment has been minimized.


salaboy commented Nov 19, 2018

This is the usual suspect...

It is a time out.. so it might be a race condition that we can easily get rid off

[ERROR] Errors: 
[ERROR]   AsyncExclusiveJobsTest>AbstractActivitiTestCase.runBare:97->AbstractTestCase.runTest:60->testExclusiveJobs:33->AbstractActivitiTestCase.waitForJobExecutorToProcessAllJobs:288 » Activiti


[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 20.154 s <<< FAILURE! - in org.activiti.engine.test.bpmn.async.AsyncExclusiveJobsTest
[ERROR] testExclusiveJobs(org.activiti.engine.test.bpmn.async.AsyncExclusiveJobsTest)  Time elapsed: 20.153 s  <<< ERROR!
org.activiti.engine.ActivitiException: time limit of 20000 was exceeded
	at org.activiti.engine.impl.test.JobTestHelper.waitForJobExecutorToProcessAllJobs(
	at org.activiti.engine.impl.test.JobTestHelper.waitForJobExecutorToProcessAllJobs(
	at org.activiti.engine.impl.test.AbstractActivitiTestCase.waitForJobExecutorToProcessAllJobs(
	at org.activiti.engine.test.bpmn.async.AsyncExclusiveJobsTest.testExclusiveJobs(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at junit.framework.TestCase.runTest(
	at org.activiti.engine.impl.test.AbstractTestCase.runTest(
	at junit.framework.TestCase.runBare(
	at org.activiti.engine.impl.test.AbstractActivitiTestCase.runBare(
	at junit.framework.TestResult$1.protect(
	at junit.framework.TestResult.runProtected(
	at junit.framework.TestSuite.runTest(
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
	at org.apache.maven.surefire.booter.ForkedBooter.execute(
	at org.apache.maven.surefire.booter.ForkedBooter.main(

@salaboy salaboy added this to Open in Activiti 7.x via automation Nov 19, 2018

@salaboy salaboy added this to the Beta4 milestone Nov 19, 2018


This comment has been minimized.


igdianov commented Nov 21, 2018

@salaboy Could you find and post the logs for testExclusiveJobs test? It is executing 2 async exclusive service tasks each waiting for 6 seconds to finish. The async executor must schedule exclusive tasks to run sequentially and wait until there are no more active jobs after 20s period. I have seen this problem before on machines with limited CPU resources.

Let's check the execution logs first. They should look like this:

07:40:49 [main] INFO  org.activiti.engine.impl.ProcessEngineImpl  - ProcessEngine default created
07:40:49 [main] INFO  org.activiti.engine.ProcessEngines  - initialised process engine default
07:40:50 [main] INFO  org.activiti.engine.impl.bpmn.deployer.BpmnDeployer  - Process deployed: {id: testExclusiveJobs:1:3, key: testExclusiveJobs}
07:40:50 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Starting up the default async job executor [org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor].
07:40:50 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Creating thread pool queue of size 100
07:40:50 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Creating executor service with corePoolSize 2, maxPoolSize 10 and keepAliveTime 5000
07:40:50 [Thread-1] INFO  org.activiti.engine.impl.asyncexecutor.AcquireAsyncJobsDueRunnable  - {} starting to acquire async jobs due
07:40:50 [Thread-2] INFO  org.activiti.engine.impl.asyncexecutor.AcquireTimerJobsRunnable  - {} starting to acquire async jobs due
07:40:50 [Thread-3] INFO  org.activiti.engine.impl.asyncexecutor.ResetExpiredJobsRunnable  - {} starting to reset expired jobs

[B] ----> ScriptB starting
	sleeping for 6 sec...
[B] ----> ScriptB ending

[A] ----> ScriptA starting
	sleeping for 6 sec...
[A] ----> ScriptA ending
script task after join! running!
07:41:03 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Shutting down the default async job executor [org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor].
07:41:03 [activiti-acquire-timer-jobs] INFO  org.activiti.engine.impl.asyncexecutor.AcquireTimerJobsRunnable  - {} stopped async job due acquisition
07:41:03 [activiti-acquire-async-jobs] INFO  org.activiti.engine.impl.asyncexecutor.AcquireAsyncJobsDueRunnable  - {} stopped async job due acquisition
07:41:03 [activiti-reset-expired-jobs] INFO  org.activiti.engine.impl.asyncexecutor.ResetExpiredJobsRunnable  - {} stopped resetting expired jobs
07:41:03 [main] INFO  org.activiti.engine.impl.test.AbstractTestCase  - database was clean

This comment has been minimized.


salaboy commented Nov 21, 2018

@igdianov nope.. no output for tests in the jenkins pipeline.. it is only showing the error

@salaboy salaboy modified the milestones: Beta4, Beta5 Nov 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment