diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4af0f4c..11ba256 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: with: java-version: ${{ matrix.java }} - name: Build with Maven - run: mvn -B package --file pom.xml -Drun.jvmArguments="-Xmx4048m -Xms1024" + run: mvn -B package --file pom.xml -Drun.jvmArguments="-Xmx4048m -Xms1024m" - uses: actions/upload-artifact@v2 with: name: delight-nashorn-sandbox diff --git a/src/test/java/delight/nashornsandbox/TestSystemRequirements.java b/src/test/java/delight/nashornsandbox/TestSystemRequirements.java index 339aa98..429727f 100644 --- a/src/test/java/delight/nashornsandbox/TestSystemRequirements.java +++ b/src/test/java/delight/nashornsandbox/TestSystemRequirements.java @@ -9,7 +9,8 @@ public class TestSystemRequirements { @Test public void test_cpu() { int processors = Runtime.getRuntime().availableProcessors(); - assertTrue("Unit tests likely to fail since they are run on a low-spec machine. Try to run on a machine with at least 2 CPU cores", processors > 1); + assertTrue("Unit tests likely to fail since they are run on a low-spec machine. Try to run on a machine with at least 2 CPU cores.\n"+ + "Processors detected: "+processors, processors > 1); } @Test @@ -17,7 +18,9 @@ public void test_memory() { long maxMemory = Runtime.getRuntime().maxMemory(); assertTrue("Unit test likely to fail. Run in an environment where the JVM has access to at least 2 GB max memory.\n"+ "Max heap memory detected "+ - maxMemory, maxMemory > 1_320_327_936); + maxMemory + "\n"+ + "Also ensure correct JVM parameters set when running tests, e.g. -Drun.jvmArguments=\"-Xmx4048m -Xms1024m\"", + maxMemory > 1_320_327_936); } }