diff options
author | Jim Hahn <jrh3@att.com> | 2019-02-13 13:55:31 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-02-14 14:00:12 -0500 |
commit | 710992a925b44fa9594d8f70bbc9f22a6f91d8ad (patch) | |
tree | 4f2ff921eb015632204f8ef6868de8db9bf27bbe /policy-management/src/test/java/org/onap | |
parent | 6683a08e12d119e1ba8fb1070a93660c0c3a3931 (diff) |
Remove jackson from policy coders
Coders came in pairs, one for GSON and one for Jackson. Replaced the
pairs with a single coder for GSON.
Simplified list copy.
Removed multipleToolsetRetries flag.
Removed additional jackson code. It had been removed, but the changes
were somehow lost.
Simplified another list copy.
Updated license dates.
Note: the date in PolicyEngineTest will be updated via a
different review (mgmt-gson).
Change-Id: Id3c7688c2389d194f66afcefa14303cf403ada16
Issue-ID: POLICY-1431
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-management/src/test/java/org/onap')
3 files changed, 3 insertions, 32 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java index ec1b9994..682d2805 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,7 +88,6 @@ public class EventProtocolCoderTest { EventProtocolParams.builder().groupId(ENCODER_GROUP).artifactId(ENCODER_ARTIFACT) .topic(NOOP_TOPIC).eventClass(DroolsConfiguration.class.getCanonicalName()) .protocolFilter(new JsonProtocolFilter()).customGsonCoder(null) - .customJacksonCoder(null) .modelClassLoaderHash(DroolsConfiguration.class.getName().hashCode())); final String json = EventProtocolCoder.manager.encode(NOOP_TOPIC, diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java index d28f1e52..da491261 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java @@ -1,8 +1,8 @@ -/*- +/* * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,18 +20,14 @@ package org.onap.policy.drools.protocol.coders; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; -import com.fasterxml.jackson.annotation.PropertyAccessor; import com.google.gson.Gson; import com.google.gson.GsonBuilder; - import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Properties; - import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -96,7 +92,6 @@ public class ProtocolCoderToolsetTest { public void testToolsets() { createController(); testGsonToolset(createFilterSet()); - testJacksonToolset(createFilterSet()); } /** @@ -129,28 +124,6 @@ public class ProtocolCoderToolsetTest { return new Triple<>("v1", "v2", "v3"); } - /** - * Test Jackson toolset. - * - * @param protocolFilter protocol filter - */ - public void testJacksonToolset(JsonProtocolFilter protocolFilter) { - JacksonProtocolCoderToolset jacksonToolset = new JacksonProtocolCoderToolset( - EventProtocolParams.builder() - .topic(JUNIT_PROTOCOL_CODER_TOPIC) - .groupId(this.releaseId.getGroupId()) - .artifactId(this.releaseId.getArtifactId()) - .eventClass(Triple.class.getCanonicalName()) - .protocolFilter(protocolFilter) - .customJacksonCoder(null) - .modelClassLoaderHash(12345678), CONTROLLER_ID); - - jacksonToolset.getEncoder().setVisibility(PropertyAccessor.FIELD, Visibility.ANY); - jacksonToolset.getDecoder().setVisibility(PropertyAccessor.FIELD, Visibility.ANY); - - testToolset(protocolFilter, jacksonToolset); - } - private void testToolset(JsonProtocolFilter protocolFilter, ProtocolCoderToolset coderToolset) { validateInitialization(protocolFilter, coderToolset); diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java index 4a2767a8..dae409ee 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java @@ -208,7 +208,6 @@ public class PolicyEngineTest { EventProtocolParams.builder().groupId(ENCODER_GROUP).artifactId(ENCODER_ARTIFACT) .topic(NOOP_TOPIC).eventClass(DroolsConfiguration.class.getCanonicalName()) .protocolFilter(new JsonProtocolFilter()).customGsonCoder(null) - .customJacksonCoder(null) .modelClassLoaderHash(DroolsConfiguration.class.getName().hashCode())); assertTrue(PolicyEngine.manager.deliver(NOOP_TOPIC, |