[Geoserver-devel] [JIRA] (GEOS-10683) FileWrapperResourceTheoryTest fails on Windows since Java 11

Dieter Stüken created an issue

GeoServer / BugGEOS-10683

FileWrapperResourceTheoryTest fails on Windows since Java 11

Issue Type:

BugBug

Affects Versions:

2.21.1

Assignee:

Unassigned

Components:

Main

Created:

29/Sep/22 1:53 PM

Environment:

Windows + Java11

Priority:

MediumMedium

Reporter:

Dieter Stüken

Since Java-11 the Windows path new File("C:", "Users") turns into "C:Users" instead of "C:\Users", which becomes a relative path now.

See: https://bugs.openjdk.org/browse/JDK-8153250

This causes the Test FileWrapperResourceTheoryTest.theoryAddingFileToDirectoryAddsResource to fail. It happens at: FileWrapperResourceTheoryTest:39 because the file is relative but the conversion into an absolute path fails badly.

The problem does not occur on the Windows GitHub CI workflow since it still uses Java-8.

Don’t know, of if the Resource concept is affected or if it is just a problem with this test class.

So I don’t have any fix by now.

org.junit.experimental.theories.internal.ParameterizedAssertionError: 
        theoryAddingFileToDirectoryAddsResource("DirC" <from getTestPaths[2]>)

at org.junit.experimental.theories.Theories$TheoryAnchor.reportParameterizedError(Theories.java:293)
at org.junit.experimental.theories.Theories$TheoryAnchor$1$1.evaluate(Theories.java:242)
at org.junit.experimental.theories.Theories$TheoryAnchor.runWithCompleteAssignment(Theories.java:223)
at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:209)
at org.junit.experimental.theories.Theories$TheoryAnchor.runWithIncompleteAssignment(Theories.java:217)
at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment(Theories.java:207)
at org.junit.experimental.theories.Theories$TheoryAnchor.evaluate(Theories.java:192)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100207-sha1:ee9e30a)

Atlassian logo