Modify ↓
Opened 9 years ago
Closed 9 years ago
#13150 closed defect (fixed)
Unit test regressions with jdk9
Reported by: | Don-vip | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.07 |
Component: | Unit tests | Version: | |
Keywords: | regression gsoc-core java9 | Cc: | michael2402 |
Description
18 more tests are failing with java 9:
jenkins/job/Java-EarlyAccess-JOSM/jdk=JDK9/lastCompletedBuild/testReport
Looks like the same stacktrace everywhere:
java.lang.IllegalStateException: Dialog was already created at org.openstreetmap.josm.gui.dialogs.LayerListDialog.createInstance(LayerListDialog.java:99) at org.openstreetmap.josm.gui.MapFrame.<init>(MapFrame.java:263) at org.openstreetmap.josm.gui.MainPanel.createNewMapFrame(MainPanel.java:88) at org.openstreetmap.josm.gui.MainPanel.updateContent(MainPanel.java:63) at org.openstreetmap.josm.gui.MainPanel$1.beforeFirstLayerAdded(MainPanel.java:157) at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:268) at org.openstreetmap.josm.gui.layer.LayerManager$1.run(LayerManager.java:183) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:146) at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:180) at org.openstreetmap.josm.JOSMFixture.setupGUI(JOSMFixture.java:147) at org.openstreetmap.josm.JOSMFixture.access$000(JOSMFixture.java:28) at org.openstreetmap.josm.JOSMFixture$1.run(JOSMFixture.java:126) at java.awt.event.InvocationEvent.dispatch(java.desktop@9-ea/InvocationEvent.java:303) at java.awt.EventQueue.dispatchEventImpl(java.desktop@9-ea/EventQueue.java:759) at java.awt.EventQueue.access$500(java.desktop@9-ea/EventQueue.java:97) at java.awt.EventQueue$3.run(java.desktop@9-ea/EventQueue.java:712) at java.awt.EventQueue$3.run(java.desktop@9-ea/EventQueue.java:706) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@9-ea/ProtectionDomain.java:77) at java.awt.EventQueue.dispatchEvent(java.desktop@9-ea/EventQueue.java:729) at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@9-ea/EventDispatchThread.java:199) at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@9-ea/EventDispatchThread.java:124) at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@9-ea/EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(java.desktop@9-ea/EventDispatchThread.java:109) at java.awt.EventDispatchThread.pumpEvents(java.desktop@9-ea/EventDispatchThread.java:101) at java.awt.EventDispatchThread.run(java.desktop@9-ea/EventDispatchThread.java:90)
Attachments (0)
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
A workaround is to add the following excludes:
<jacoco:coverage destfile="${test.dir}/jacoco@{testITsuffix}.exec" enabled="@{coverage}" excludes="jdk.dynalink.*:jdk.nashorn.*">
We don't need those classes to be tested any way.
This reduced the number of failed tests by 60 for me.
comment:3 by , 9 years ago
ok thanks I'll try that :) Can you please report the issue upstream to https://github.com/jacoco/jacoco/issues ?
Note:
See TracTickets
for help on using tickets.
This is not a problem with the tests itself. A previous test was failing and destroyed JOSM internal state.
I'm currently getting this in 54 tests.
The first test that has this problem is
org.openstreetmap.josm.actions.JoinAreasActionTest
It is caused by nashorn/jacoco. The test that failed previously was
org.openstreetmap.josm.actions.AlignInLineActionTest
:See #11924