I'll write the summary of current findings to have a common place for tracking this:
It seems like we are having two "issues" of different nature:
1) It was reported that some PRs are raising this error:
If you look inside:
some of the failing tests have "weird" failures like this one here:
java.lang.ClassCastException: Cannot cast org.kie.workbench.common.stunner.bpmn.definition.UserTask to org.kie.workbench.common.stunner.bpmn.definition.NoneTask
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
And errors like:
Failing for the past 4 builds (Since Unstable#1615 )
Took 31 ms.
On the other hand, we have many PRs, and even Stunner PRs, that have passed the tests for both the "normal build" and the "full downstream build" with no problems.
2) OutOfMemory error
Additionally or related with the above errors we have an OutOfMemory when running the stunner kie-wb-common-stunner-bpmn-backend tests. This also is apparently not happening in all PRs. But can be reproduced locally more easy.
[ERROR] UserTaskTest.testMarshallSubprocessLevelTaskFilledProperties » OutOfMemory ...
[ERROR] UserTaskTest.testMarshallSubprocessLevelTaskTwoIncomesFilledProperties:1126->Task.checkTaskMarshalling:222->BPMNDiagramMarshallerBase.unmarshall:387 » OutOfMemory
[ERROR] Tests run: 1641, Failures: 0, Errors: 2, Skipped: 24
For this last error I could see that the basically the org.apache.maven.surefire.booter.ForkedBooter process launched for executing the maven-sure-fire plugin is running out of memory.
A quick fix, and probably the fix is to increase the memory settings for the maven-surefire-plugin. The memory settings for this plugin are basically in the link below. Note that current configuration is 1024m for the JVM dedicated to run the tests. It's expected that this memory should be good enough for running all the tests, but it could be the case that the JVM just runs out of memory.