diff options
author | Congcong Peng <peng.congcong@zte.com.cn> | 2018-02-28 10:13:25 +0800 |
---|---|---|
committer | Congcong Peng <peng.congcong@zte.com.cn> | 2018-02-28 11:34:18 +0800 |
commit | bf80e854b11fc8570ceb0ea161a95803a346fb8b (patch) | |
tree | 6786d3df4d1e36e91389daa703066f71299a2e9b /dmaap-dsa | |
parent | 18d79592085657e5d91daee17c09775e80fc671b (diff) |
remove dependency
Issue-ID: HOLMES-115
Change-Id: I0f453bb10ed6f8c975046bcc8007d34fa27d60bd
Signed-off-by: Congcong Peng <peng.congcong@zte.com.cn>
Diffstat (limited to 'dmaap-dsa')
3 files changed, 14 insertions, 10 deletions
diff --git a/dmaap-dsa/pom.xml b/dmaap-dsa/pom.xml index fdd2462..09364e7 100644 --- a/dmaap-dsa/pom.xml +++ b/dmaap-dsa/pom.xml @@ -32,6 +32,16 @@ <dependency> <groupId>org.onap.msb.java-sdk</groupId> <artifactId>msb-java-sdk</artifactId> + <exclusions> + <exclusion> + <groupId>com.eclipsesource.jaxrs</groupId> + <artifactId>jersey-all</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.onap.holmes.common</groupId> @@ -171,7 +181,7 @@ <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> - <version>3.15.0-GA</version> + <version>3.22.0-GA</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> diff --git a/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java b/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java index 4845b73..d67b901 100644 --- a/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java +++ b/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java @@ -25,7 +25,6 @@ import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Response; import lombok.Getter; import lombok.Setter; -import org.glassfish.jersey.client.ClientConfig; import org.onap.holmes.common.api.stat.VesAlarm; import org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder; import org.onap.holmes.common.exception.CorrelationException; @@ -77,7 +76,7 @@ public class Subscriber { } private List<String> getDMaaPData() { - Client client = ClientBuilder.newClient(new ClientConfig()); + Client client = ClientBuilder.newClient(); WebTarget webTarget = client.target(url + "/" + consumerGroup + "/" + consumer); Response response = webTarget.queryParam("timeout", timeout).request().get(); return response.readEntity(List.class); diff --git a/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/SubscriberTest.java b/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/SubscriberTest.java index d1d3653..bc6486c 100644 --- a/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/SubscriberTest.java +++ b/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/SubscriberTest.java @@ -15,12 +15,8 @@ */ package org.onap.holmes.dsa.dmaappolling; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.sun.org.apache.regexp.internal.RE; -import io.dropwizard.cli.Cli; import org.easymock.EasyMock; import org.glassfish.hk2.api.ServiceLocator; -import org.glassfish.jersey.client.ClientConfig; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -133,7 +129,7 @@ public class SubscriberTest { Response response = PowerMock.createMock(Response.class); Invocation.Builder builder = PowerMock.createMock(Invocation.Builder.class); - EasyMock.expect(ClientBuilder.newClient(EasyMock.anyObject(ClientConfig.class))).andReturn(client); + EasyMock.expect(ClientBuilder.newClient()).andReturn(client); EasyMock.expect(client.target(EasyMock.anyObject(String.class))).andReturn(webTarget); EasyMock.expect(webTarget.queryParam("timeout", 15000)).andReturn(webTarget); EasyMock.expect(webTarget.request()).andReturn(builder); @@ -144,8 +140,7 @@ public class SubscriberTest { List<VesAlarm> vesAlarms = new Subscriber().subscribe(); - assertThat(new ObjectMapper().writeValueAsString(vesAlarm), - equalTo(new ObjectMapper().writeValueAsString(vesAlarms.get(0)))); + assertThat(vesAlarm, equalTo(vesAlarms.get(0))); PowerMock.verifyAll(); } |