diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b335db41d..0f2fe93f9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -61,6 +61,10 @@ jobs: - name: Compile with Maven run: mvn -B compile test-compile --file pom.xml + - name: Test exec plugin + run: | + mvn exec:java -P sqlite -Dexec.args="-b noop -c config/sqlite/sample_noop_config.xml --create=true --load=true --execute=true" + - name: Test with Maven run: mvn -B test --file pom.xml diff --git a/src/main/java/com/oltpbenchmark/api/BenchmarkModule.java b/src/main/java/com/oltpbenchmark/api/BenchmarkModule.java index d8e9dbb9f..989d6eb9a 100644 --- a/src/main/java/com/oltpbenchmark/api/BenchmarkModule.java +++ b/src/main/java/com/oltpbenchmark/api/BenchmarkModule.java @@ -62,7 +62,7 @@ public BenchmarkModule(WorkloadConfiguration workConf) { this.workConf = workConf; this.dialects = new StatementDialects(workConf); // setClassLoader(); - this.classLoader = ClassLoader.getSystemClassLoader(); + this.classLoader = Thread.currentThread().getContextClassLoader(); } /** @@ -70,7 +70,7 @@ public BenchmarkModule(WorkloadConfiguration workConf) { * implementation. */ protected void setClassLoader() { - this.classLoader = ClassLoader.getSystemClassLoader(); + this.classLoader = Thread.currentThread().getContextClassLoader(); } // -------------------------------------------------------------------------- diff --git a/src/main/java/com/oltpbenchmark/util/ClassUtil.java b/src/main/java/com/oltpbenchmark/util/ClassUtil.java index 474dfa6bf..8d4eca577 100644 --- a/src/main/java/com/oltpbenchmark/util/ClassUtil.java +++ b/src/main/java/com/oltpbenchmark/util/ClassUtil.java @@ -184,7 +184,7 @@ public static Constructor getConstructor(Class target_class, Class. * @return */ public static Class getClass(String class_name) { - return getClass(ClassLoader.getSystemClassLoader(), class_name); + return getClass(Thread.currentThread().getContextClassLoader(), class_name); } /**