Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sapphire-dev] Sporadic unit tests failure on Java 7

It seems that when running Sapphire unit tests on Java 7, one test fails with an exception like this one:

 

java.lang.IllegalStateException

      at org.eclipse.sapphire.ElementList.insert$(ElementList.java:426)

      at org.eclipse.sapphire.ElementList.insert(ElementList.java:315)

      at org.eclipse.sapphire.tests.index.IndexTests.testMultipleIndexes(IndexTests.java:124)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

 

Which test fails tends to vary, but the top of the stack trace is always the same. Sometimes all test complete successfully. Normally, intermittent behavior like this implies a threading issue, but there is no threading involved in the unit tests that fail. I’ve spent a considerable amount of time analyzing this issue and do not see how the code in question can fail like that.

 

I am forced to conclude that we are looking at JVM bug in Java 7. The issue does not reproduce on Java 6 or Java 8.

 

There is a bug to track this issue.

 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=432383

 

Make sure that you use Java 6 or Java 8 to run Sapphire unit tests.

 

Thanks,

 

- Konstantin


Back to the top