summaryrefslogtreecommitdiffstats
path: root/testsuites/performance/performance-benchmark-test/src/main
diff options
context:
space:
mode:
authorhuaxing <huaxing.jin@est.tech>2020-06-10 14:58:34 +0800
committerhuaxing <huaxing.jin@est.tech>2020-06-12 09:59:42 +0800
commit718a1611a1e580ed7874088e1a0e013416334989 (patch)
tree605f35ec8940bb986deaf7b96a76b97709ba7b76 /testsuites/performance/performance-benchmark-test/src/main
parent950622063ecc737ef7106ed9c380a077441b76aa (diff)
Improve robustness of unit testing
Issue-ID: POLICY-2630 Signed-off-by: huaxing <huaxing.jin@est.tech> Change-Id: I6475f9272c1a770836af537c13b23e486b66ac3e
Diffstat (limited to 'testsuites/performance/performance-benchmark-test/src/main')
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java3
1 files changed, 2 insertions, 1 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);
}
}