imagej / imagej-legacy

ImageJ+ImageJ2 compatibility layer
https://imagej.net/libs/imagej-legacy
BSD 2-Clause "Simplified" License
16 stars 25 forks source link

Test behavior is inconsistent #260

Closed hinerm closed 3 years ago

hinerm commented 3 years ago

I have been running into test failures at various states of the code. This only happens building locally - on Travis there are no failures, no tests skipped, no exceptions.

Master (5d66b5314f75810fe1f8ff8db1323b9941c3d2ee)

On Windows:

[ERROR] Failures:
[ERROR]   LegacyOpenerTest.testPaulsMacro:88 expected:<3> but was:<10>
[ERROR]   LegacyOpenerTest.testSliceLabels:126 expected:<[Hello, World!]> but was:<[1]>

On WSL/Ubuntu 20, no failures but exceptions due to headless:

[INFO] Running net.imagej.legacy.LegacyOpenerTest
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
        at java.awt.Window.<init>(Window.java:536)

Latest release (imagej-legagcy-0.37.4)

On both WSL/Ubuntu 20:

[ERROR] Failures:
[ERROR]   LegacyOpenerTest.testPaulsMacro:89 expected:<3> but was:<1>
[ERROR]   MacroTest.testBarePluginFromMacro:140 expected:<[c:\hello\world]> but was:<[/home/hinerm/code/imagej-legacy/target/bare-testBarePluginFromMacro-L112]>
[ERROR]   MacroTest.testLegacyCompatibleMacro:88

On Windows:

[ERROR] Failures:
[ERROR]   LegacyOpenerTest.testPaulsMacro:89 expected:<3> but was:<10>
[ERROR]   LegacyOpenerTest.testSliceLabels:127 expected:<[Hello, World!]> but was:<[1]>
[ERROR]   MacroTest.testBarePluginFromMacro:140 expected:<[c:\hello\world]> but was:<[C:\Users\hiner\Documents\GitHub\imagej-legacy\target\bare-testBarePluginFromMacro-L112]>
hinerm commented 3 years ago

OK I see that this is at least partially because my system had "use scifio to open images" selected..

hinerm commented 3 years ago

And partially because these tests require a display to run. Side note: WSL2 has different X server setup than WSL1! ☠️

hinerm commented 1 year ago

This was also duplicating https://github.com/imagej/imagej-legacy/issues/198