From 6c8f7249cb9b53d9e77c5ba55367db559b752db6 Mon Sep 17 00:00:00 2001 From: David Hadka Date: Sun, 31 Dec 2023 18:30:19 +0000 Subject: [PATCH] Use assume --- .github/workflows/ci.yml | 4 ---- native/Radar/bin/startEval.m | 3 --- .../benchmarks/BenchmarkProviderTest.java | 13 +++---------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0fe302..8f8c744 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,6 @@ jobs: - name: Setup Matlab (Linux only) uses: matlab-actions/setup-matlab@v1 if: runner.os == 'Linux' - - name: Test Matlab (Linux only) - if: runner.os == 'Linux' - run: | - matlab -batch "exit(0)" - name: Setup Radar Waveform code (Linux only) if: runner.os == 'Linux' run: | diff --git a/native/Radar/bin/startEval.m b/native/Radar/bin/startEval.m index 3f5ec88..64d84ae 100644 --- a/native/Radar/bin/startEval.m +++ b/native/Radar/bin/startEval.m @@ -22,9 +22,6 @@ port = libpointer end -disp('Using port') -disp(port) - disp('Waiting for connection...'); calllib(libname, 'MOEA_Init_socket', nobjs, ncons, port); disp('Connection established...'); diff --git a/src/test/java/org/moeaframework/benchmarks/BenchmarkProviderTest.java b/src/test/java/org/moeaframework/benchmarks/BenchmarkProviderTest.java index 75b344a..b2500aa 100644 --- a/src/test/java/org/moeaframework/benchmarks/BenchmarkProviderTest.java +++ b/src/test/java/org/moeaframework/benchmarks/BenchmarkProviderTest.java @@ -24,7 +24,6 @@ import org.junit.Ignore; import org.junit.Test; import org.moeaframework.Executor; -import org.moeaframework.core.FrameworkException; import org.moeaframework.core.spi.ProblemFactory; import org.moeaframework.problem.NativeCommand; @@ -57,18 +56,12 @@ protected void requires(NativeCommand command) { if (process.isAlive()) { process.destroy(); - throw new FrameworkException("Process did not terminate within configured timeout"); - //Assume.assumeTrue("Process did not terminate within configured timeout", false); + Assume.assumeTrue("Process did not terminate within configured timeout", false); } - if (process.exitValue() != 0) { - throw new FrameworkException("Process exited with non-zero result code"); - } - - //Assume.assumeTrue("Process exited with non-zero result code", process.exitValue() == 0); + Assume.assumeTrue("Process exited with non-zero result code", process.exitValue() == 0); } catch (Exception e) { - throw new FrameworkException("Caught exception when invoking process", e); - //Assume.assumeNoException("Caught exception when invoking process", e); + Assume.assumeNoException("Caught exception when invoking process", e); } }