Updated holmes-actions to 1.3.5 93/122693/1
authorGuangrongFu <fu.guangrong@zte.com.cn>
Mon, 19 Jul 2021 11:09:39 +0000 (19:09 +0800)
committerGuangrongFu <fu.guangrong@zte.com.cn>
Mon, 19 Jul 2021 11:09:39 +0000 (19:09 +0800)
Change-Id: I7c24569f762233f3bbe0805dc6d6b280a6105c0f
Issue-ID: HOLMES-461
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java
engine-d/src/test/java/org/onap/holmes/dsa/dmaappolling/SubscriberTest.java
pom.xml

index 2c9d88b..8c3d4f5 100644 (file)
@@ -77,15 +77,15 @@ public class Subscriber {
         }
     }
 
         }
     }
 
-    private List<String> getDMaaPData() throws Exception {
-        return new JerseyClient()
+    private List<String> getDMaaPData() {
+        return JerseyClient.newInstance()
                 .path(consumerGroup)
                 .path(consumer)
                 .queryParam("timeout", period)
                 .get(url, List.class);
     }
 
                 .path(consumerGroup)
                 .path(consumer)
                 .queryParam("timeout", period)
                 .get(url, List.class);
     }
 
-    private List<VesAlarm> extractVesAlarm(List<String> responseEntity) throws IOException {
+    private List<VesAlarm> extractVesAlarm(List<String> responseEntity) {
         List<VesAlarm> vesAlarmList = new ArrayList<>();
         for (String entity : responseEntity) {
             vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity));
         List<VesAlarm> vesAlarmList = new ArrayList<>();
         for (String entity : responseEntity) {
             vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity));
index 4cf1caf..f88ddfb 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2017-2020 ZTE Corporation.
+ * Copyright 2017-2021 ZTE Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ import static org.hamcrest.CoreMatchers.*;
 import static org.junit.Assert.assertThat;
 
 @RunWith(PowerMockRunner.class)
 import static org.junit.Assert.assertThat;
 
 @RunWith(PowerMockRunner.class)
-@PrepareForTest({ServiceLocatorHolder.class, ServiceLocator.class, Subscriber.class})
+@PrepareForTest({ServiceLocatorHolder.class, JerseyClient.class})
 @PowerMockIgnore("javax.net.ssl.*")
 public class SubscriberTest {
 
 @PowerMockIgnore("javax.net.ssl.*")
 public class SubscriberTest {
 
@@ -220,7 +220,8 @@ public class SubscriberTest {
         subscriber.setUrl("https://www.onap.org");
         subscriber.setConsumerGroup("group");
         subscriber.setConsumer("consumer");
         subscriber.setUrl("https://www.onap.org");
         subscriber.setConsumerGroup("group");
         subscriber.setConsumer("consumer");
-        List<VesAlarm> vesAlarms = subscriber.subscribe();
+
+        subscriber.subscribe();
 
         PowerMock.verifyAll();
     }
 
         PowerMock.verifyAll();
     }
diff --git a/pom.xml b/pom.xml
index d32c194..661f3a4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <dependency>
             <groupId>org.onap.holmes.common</groupId>
             <artifactId>holmes-actions</artifactId>
         <dependency>
             <groupId>org.onap.holmes.common</groupId>
             <artifactId>holmes-actions</artifactId>
-            <version>1.3.4</version>
+            <version>1.3.5</version>
             <exclusions>
                 <exclusion>
                     <groupId>io.dropwizard</groupId>
             <exclusions>
                 <exclusion>
                     <groupId>io.dropwizard</groupId>