snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

QuarkusIntegrationTest cannot locate build output directory if it contains special characters like # #353

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

My project path contains '#' character, which gives me the following exception:

java.lang.IllegalStateException: The determined Quarkus build output 'C:\Workspace\%23git\test\service\test-service\target' is not a directory
    at io.quarkus.test.junit.QuarkusIntegrationTestExtension.determineBuildOutputDirectory(QuarkusIntegrationTestExtension.java:154)
    at io.quarkus.test.junit.QuarkusIntegrationTestExtension.readQuarkusArtifactProperties(QuarkusIntegrationTestExtension.java:112)
    at io.quarkus.test.junit.QuarkusIntegrationTestExtension.ensureStarted(QuarkusIntegrationTestExtension.java:79)
    at io.quarkus.test.junit.QuarkusIntegrationTestExtension.beforeAll(QuarkusIntegrationTestExtension.java:73)
        ...

The problem is: https://github.com/quarkusio/quarkus/blob/13fb194d4f3cf25495758f325aee5977a80d91a4/test-framework/junit5/src/main/java/io/quarkus/test/junit/IntegrationTestUtil.java#L277

Which uses url.getPath, which gives an URL-encoded path! This can be fixed by calling URLDecoder.decode(p, "UTF-8") before providing the path to the File constructor.


https://github.com/quarkusio/quarkus/issues/17607


$upstream:17607$