diff options
Diffstat (limited to 'testsuites/performance/performance-benchmark-test')
2 files changed, 4 insertions, 4 deletions
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java index 36d6add43..3f6cad8e7 100644 --- a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java +++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java @@ -23,6 +23,7 @@ package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator; import java.io.IOException; import java.net.URI; +import java.nio.file.InvalidPathException; import java.util.Arrays; import org.apache.commons.cli.ParseException; @@ -104,7 +105,7 @@ public class EventGenerator { if (parameters.getOutFile() != null) { try { TextFileUtils.putStringAsTextFile(getEventGenerationStats(), parameters.getOutFile()); - } catch (IOException ioe) { + } catch (IOException | InvalidPathException ioe) { LOGGER.warn("could not output statistics to file \"" + parameters.getOutFile() + "\"", ioe); } } diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java index 3d37b3f4c..dcbafba07 100644 --- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java +++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java @@ -140,7 +140,7 @@ public class EventGeneratorTest { @Test public void testEventGeneratorOutfileBad() { EventGeneratorParameters pars = new EventGeneratorParameters(); - pars.setOutFile("/I/Dont/Exist"); + pars.setOutFile("/I/Dont/Exist*"); EventGenerator generator = new EventGenerator(pars); assertNotNull(generator); @@ -151,7 +151,6 @@ public class EventGeneratorTest { final String outString = outContent.toString(); System.setOut(stdout); - - assertTrue(outString.contains("could not output statistics to file \"/I/Dont/Exist\"")); + assertTrue(outString.contains("could not output statistics to file \"/I/Dont/Exist*\"")); } } |