From 1ba6a3268b220cc99e9ed993553fa6f34f111a39 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 22 Feb 2019 17:30:59 +0000 Subject: Change versions of Zookeeper and C3P0 This review changes the versions of Zookeeper and C3P0 to resolve security issues. It also merges the context test utils module into the context test because that module was misplaced and put an incompatible Zookeeper dependency in the APEX context module. Issue-ID: POLICY-1540 Change-Id: I86048ae1fc8b818611f423d6fd1f4a9fcc3f76f9 Signed-off-by: liamfallon --- .../performance/context/metrics/MetricsTest.java | 94 ---------------------- .../src/test/resources/hazelcast/hazelcast.xml | 63 --------------- .../resources/infinispan/default-jgroups-tcp.xml | 76 ----------------- .../src/test/resources/infinispan/infinispan.xml | 41 ---------- 4 files changed, 274 deletions(-) delete mode 100644 testsuites/performance/performance-context-metrics/src/test/java/org/onap/policy/apex/testsuites/performance/context/metrics/MetricsTest.java delete mode 100644 testsuites/performance/performance-context-metrics/src/test/resources/hazelcast/hazelcast.xml delete mode 100644 testsuites/performance/performance-context-metrics/src/test/resources/infinispan/default-jgroups-tcp.xml delete mode 100644 testsuites/performance/performance-context-metrics/src/test/resources/infinispan/infinispan.xml (limited to 'testsuites/performance/performance-context-metrics/src/test') diff --git a/testsuites/performance/performance-context-metrics/src/test/java/org/onap/policy/apex/testsuites/performance/context/metrics/MetricsTest.java b/testsuites/performance/performance-context-metrics/src/test/java/org/onap/policy/apex/testsuites/performance/context/metrics/MetricsTest.java deleted file mode 100644 index af6b46918..000000000 --- a/testsuites/performance/performance-context-metrics/src/test/java/org/onap/policy/apex/testsuites/performance/context/metrics/MetricsTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2016-2018 Ericsson. 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.apex.testsuites.performance.context.metrics; - -import static org.junit.Assert.fail; - -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.SortedSet; - -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.onap.policy.apex.context.test.utils.NetworkUtils; -import org.onap.policy.apex.testsuites.performance.context.metrics.ConcurrentContextMetrics; -import org.onap.policy.common.utils.resources.ResourceUtils; -import org.slf4j.ext.XLogger; -import org.slf4j.ext.XLoggerFactory; - -/** - * The Class TestMetrics. - */ -public class MetricsTest { - // Logger for this class - private static final XLogger LOGGER = XLoggerFactory.getXLogger(MetricsTest.class); - private static final String HAZELCAST_CONFIG = "hazelcast.config"; - - private static final String JAVA_NET_PREFER_IPV4_STACK = "java.net.preferIPv4Stack"; - private static final String HAZELCAST_XML_FILE = "src/test/resources/hazelcast/hazelcast.xml"; - - @Rule - public final TemporaryFolder folder = new TemporaryFolder(); - - /** - * Configure. - * - * @throws Exception the exception - */ - @BeforeClass - public static void configure() throws Exception { - System.setProperty(JAVA_NET_PREFER_IPV4_STACK, "true"); - final String hazelCastfileLocation = ResourceUtils.getFilePath4Resource(HAZELCAST_XML_FILE); - System.setProperty(HAZELCAST_CONFIG, hazelCastfileLocation); - - final SortedSet ipAddressSet = NetworkUtils.getIPv4NonLoopAddresses(); - - if (ipAddressSet.size() == 0) { - throw new Exception("cound not find real IP address for test"); - } - LOGGER.info("For Infinispan, setting jgroups.tcp.address to: {}", ipAddressSet.first()); - System.setProperty("jgroups.tcp.address", ipAddressSet.first()); - - } - - /** - * Gets the single jvm metrics. - * - * @throws IOException Signals that an I/O exception has occurred. - */ - @Test - public void getSingleJvmMetrics() throws IOException { - final File zookeeperDirectory = folder.newFolder("zookeeperDirectory"); - final String[] args = {"singleJVMTestNL", "1", "32", "1000", "65536", "0", "localhost", "62181", - zookeeperDirectory.getAbsolutePath()}; - - LOGGER.info("Starting with args: {}", Arrays.toString(args)); - try { - ConcurrentContextMetrics.main(args); - } catch (final Exception exception) { - LOGGER.error("Unexpected error", exception); - fail("Metrics test failed"); - } - } -} diff --git a/testsuites/performance/performance-context-metrics/src/test/resources/hazelcast/hazelcast.xml b/testsuites/performance/performance-context-metrics/src/test/resources/hazelcast/hazelcast.xml deleted file mode 100644 index 932b33cc9..000000000 --- a/testsuites/performance/performance-context-metrics/src/test/resources/hazelcast/hazelcast.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - HazelcastGroup3.0EVAL - password3.0EVAL - - - 5706 - - - 224.2.2.10 - 54327 - - - 127.0.0.1 - - - - - 127.0.0.* - - - - false - slf4j - - false - 60 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - - - 2 - - diff --git a/testsuites/performance/performance-context-metrics/src/test/resources/infinispan/default-jgroups-tcp.xml b/testsuites/performance/performance-context-metrics/src/test/resources/infinispan/default-jgroups-tcp.xml deleted file mode 100644 index 028cf1df6..000000000 --- a/testsuites/performance/performance-context-metrics/src/test/resources/infinispan/default-jgroups-tcp.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/testsuites/performance/performance-context-metrics/src/test/resources/infinispan/infinispan.xml b/testsuites/performance/performance-context-metrics/src/test/resources/infinispan/infinispan.xml deleted file mode 100644 index 5b416f50d..000000000 --- a/testsuites/performance/performance-context-metrics/src/test/resources/infinispan/infinispan.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -- cgit 1.2.3-korg