Skip to content

Commit

Permalink
test: allow loading modules from classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
keturn committed Apr 20, 2021
1 parent 7afd84a commit 46be63e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class NameGeneratorTestingEnvironment {
*/
@BeforeAll
public static void setUpClass() {
System.setProperty(ModuleManager.LOAD_CLASSPATH_MODULES_PROPERTY, "true");

env = new HeadlessEnvironment(new Name("NameGenerator"));

Context context = env.getContext();
Expand All @@ -52,6 +54,8 @@ public static void setUpClass() {
*/
@AfterAll
public static void tearDownClass() throws Exception {
env.close();
if (env != null) {
env.close();
}
}
}

0 comments on commit 46be63e

Please sign in to comment.