Skip to content

Commit

Permalink
If the test class is coming from a JAR, project root should not be in…
Browse files Browse the repository at this point in the history
…itialized to the current dir
  • Loading branch information
aloubyansky committed Apr 8, 2020
1 parent 0b83824 commit 0a20595
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -106,7 +107,7 @@ private ExtensionState doJavaStart(ExtensionContext context) throws Throwable {
}
CuratedApplication curatedApplication = runnerBuilder
.setTest(true)
.setProjectRoot(new File("").toPath())
.setProjectRoot(Files.isDirectory(appClassLocation) ? new File("").toPath() : null)
.build()
.bootstrap();

Expand Down

0 comments on commit 0a20595

Please sign in to comment.