[keycloak-dev] no stack trace in testsuite failed run

Marek Posolda mposolda at redhat.com
Wed Jun 21 04:42:58 EDT 2017


I've just had similar (or probably same) issue in ComponentsTest.

TestCleanup class was using thread-unsafe LinkedList under the covers. 
So some concurrency tests had issues, as they updated LinkedList from 
more threads and then this NPE can happen when iterating through LinkedList:

java.lang.NullPointerException
     at java.util.LinkedList$ListItr.next(LinkedList.java:893)
     at 
org.keycloak.testsuite.util.TestCleanup.executeCleanup(TestCleanup.java:143)
     at 
org.keycloak.testsuite.AbstractKeycloakTest.afterAbstractKeycloakTest(AbstractKeycloakTest.java:178)

When this happened, I saw the other test methods fail with empty NPE 
like for you.

I've fixed it in latest master by making the class TestCleanup 
thread-safe. Hopefully this will fix your issue too. Sorry for troubles 
as thread-unsafe TestCleanup was my fault :(

BTV. Some concurrency tests like BruteForceTest or ComponentsTest still 
have issues because of H2 locks. I can sometimes simulate on my laptop 
and seeing that they sometime fails on travis too. But that's separate 
issue and hopefully it's just specific to H2.

Marek


On 16/06/17 23:36, Bill Burke wrote:
> I performed the following in integration-arquillian testsuite
>
> mvn -Dkeycloak.logging.level=debug clean install > out.txt 2>&1
>
> My test is failing in AbstractKeycloakTest.afterAbstractKeycloakTest
> while running TestCleanup loop.  I'm getting a NullPointerException but
> I can't seem to get the testsuite to output the stack trace.  I do see
> info level logs from this class, but no stack trace.  Even if I add a
> exception.printStackTrace(). The stack trace is empty.
>
> Any ideas?  This popped up before but just magically disappeared.  Now
> its back.  The test failure only comes up in a full maven build.  Can't
> reproduce in IDE.
>
> Thanks,
>
> Bill
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev




More information about the keycloak-dev mailing list