summaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-uservice-test/src
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@ericsson.com>2018-07-06 16:37:36 +0100
committerwaqas.ikram <waqas.ikram@ericsson.com>2018-07-09 14:07:58 +0100
commitdba5999ebf16a85a996f1f5502c2c154ac3f38b2 (patch)
tree189c48972b92213ae7b853ce6c100f52a196635b /testsuites/integration/integration-uservice-test/src
parentdcf8f703fdd07161c86231ecc4af0f25872a45f4 (diff)
Fixing Multi JVM Tests and sonar bugs
Change-Id: I02df58695b44d5768410a0eaccb090cda7eb85ba Issue-ID: POLICY-865 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
Diffstat (limited to 'testsuites/integration/integration-uservice-test/src')
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/apps/uservice/test/adapt/kafka/TestKafka2Kafka.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/apps/uservice/test/adapt/kafka/TestKafka2Kafka.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/apps/uservice/test/adapt/kafka/TestKafka2Kafka.java
index 0874d9827..8468b6d7f 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/apps/uservice/test/adapt/kafka/TestKafka2Kafka.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/apps/uservice/test/adapt/kafka/TestKafka2Kafka.java
@@ -91,9 +91,15 @@ public class TestKafka2Kafka {
@AfterClass
public static void shutdownDummyKafkaServer() throws IOException {
- kafkaServer.shutdown();
- zkClient.close();
- zkServer.shutdown();
+ if (kafkaServer != null) {
+ kafkaServer.shutdown();
+ }
+ if (zkClient != null) {
+ zkClient.close();
+ }
+ if (zkServer != null) {
+ zkServer.shutdown();
+ }
}
@Test