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/pom.xml | 93 ------ .../context/metrics/ConcurrentContextMetrics.java | 322 --------------------- .../performance/context/metrics/package-info.java | 27 -- .../src/site/css/site.css | 100 ------- .../src/site/images/logos.png | Bin 162383 -> 0 bytes .../performance-context-metrics/src/site/site.xml | 28 -- .../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 --- 10 files changed, 844 deletions(-) delete mode 100644 testsuites/performance/performance-context-metrics/pom.xml delete mode 100644 testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/ConcurrentContextMetrics.java delete mode 100644 testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/package-info.java delete mode 100644 testsuites/performance/performance-context-metrics/src/site/css/site.css delete mode 100644 testsuites/performance/performance-context-metrics/src/site/images/logos.png delete mode 100644 testsuites/performance/performance-context-metrics/src/site/site.xml 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') diff --git a/testsuites/performance/performance-context-metrics/pom.xml b/testsuites/performance/performance-context-metrics/pom.xml deleted file mode 100644 index 3e65f466c..000000000 --- a/testsuites/performance/performance-context-metrics/pom.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - 4.0.0 - - org.onap.policy.apex-pdp.testsuites.performance - performance - 2.1.0-SNAPSHOT - - - performance-context-metrics - ${project.artifactId} - [${project.parent.artifactId}] module to calculate metrics using various plugins - - - - org.onap.policy.common - utils - - - org.onap.policy.apex-pdp.core - core-infrastructure - ${project.version} - - - org.onap.policy.apex-pdp.context - context-test-utils - ${project.version} - - - org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution - plugins-context-distribution-hazelcast - ${project.version} - - - org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution - plugins-context-distribution-infinispan - ${project.version} - - - org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking - plugins-context-locking-curator - ${project.version} - - - org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking - plugins-context-locking-hazelcast - ${project.version} - - - org.apache.curator - curator-test - 3.2.0 - test - - - - - - apexSite - - - apexSite - - - - - ${project.artifactId}-site - ${apex.adsite.prefix}/modules/testsuites/${project.parent.artifactId}/${project.artifactId}/ - - - - - \ No newline at end of file diff --git a/testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/ConcurrentContextMetrics.java b/testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/ConcurrentContextMetrics.java deleted file mode 100644 index b0bfb1ce7..000000000 --- a/testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/ConcurrentContextMetrics.java +++ /dev/null @@ -1,322 +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.onap.policy.apex.context.parameters.DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS; -import static org.onap.policy.apex.context.parameters.LockManagerParameters.DEFAULT_LOCK_MANAGER_PLUGIN_CLASS; - -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.Map; -import java.util.Map.Entry; - -import org.onap.policy.apex.context.parameters.ContextParameters; -import org.onap.policy.apex.context.parameters.DistributorParameters; -import org.onap.policy.apex.context.test.concepts.TestContextLongItem; -import org.onap.policy.apex.context.test.locking.ConcurrentContext; -import org.onap.policy.apex.context.test.utils.ConfigrationProvider; -import org.onap.policy.apex.context.test.utils.ConfigrationProviderImpl; -import org.onap.policy.apex.context.test.utils.ZooKeeperServerServiceProvider; -import org.onap.policy.apex.model.basicmodel.concepts.ApexException; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; -import org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor; -import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor; -import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters; -import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager; -import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManagerParameters; -import org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager; -import org.slf4j.ext.XLogger; -import org.slf4j.ext.XLoggerFactory; - -/** - * The Class concurrentContextMetrics tests concurrent use of context. - * - * @author Liam Fallon (liam.fallon@ericsson.com) - */ -public class ConcurrentContextMetrics { - private static final int NUM_ARGS = 9; - private static final int ARG_LABEL = 0; - private static final int ARG_JVM_COUNT = 1; - private static final int ARG_THREAD_COUNT = 2; - private static final int ARG_ITERATIONS = 3; - private static final int ARG_ARRAY_SIZE = 4; - private static final int ARG_LOCK_TYPE = 5; - private static final int ARG_ZOOKEEPER_ADDRESS = 6; - private static final int ARG_ZOOKEEPER_PORT = 7; - private static final int ARG_ZOOKEEPER_DIRECTORY = 8; - - // Logger for this class - private static final XLogger LOGGER = XLoggerFactory.getXLogger(ConcurrentContextMetrics.class); - - private String zookeeperAddress = null; - private final ConfigrationProvider configrationProvider; - private final File zookeeperDirectory; - private final int zookeeperPort; - - /** - * Construct a concurrent context object. - * - * @param configrationProvider Configuration for the context metrics - * @param zookeeperAddress Zookeeper address - * @param zookeeperPort Zookeeper port - * @param zookeeperDirectory Zookeeper directory - */ - public ConcurrentContextMetrics(final ConfigrationProvider configrationProvider, final String zookeeperAddress, - final int zookeeperPort, final String zookeeperDirectory) { - this.configrationProvider = configrationProvider; - this.zookeeperAddress = zookeeperAddress; - this.zookeeperPort = zookeeperPort; - this.zookeeperDirectory = new File(zookeeperDirectory); - } - - /** - * Concurrent context metrics JVM local. - * - * @throws ApexModelException the apex model exception - * @throws IOException the IO exception - * @throws ApexException the apex exception - */ - private void concurrentContextMetricsJvmLocal() throws ApexException { - if (configrationProvider.getJvmCount() != 1) { - return; - } - - LOGGER.debug("Running concurrentContextMetricsJVMLocalVarSet metrics . . ."); - - final ContextParameters contextParameters = new ContextParameters(); - contextParameters.getDistributorParameters().setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS); - contextParameters.getLockManagerParameters().setPluginClass(DEFAULT_LOCK_MANAGER_PLUGIN_CLASS); - runConcurrentContextMetrics("JVMLocal"); - - LOGGER.debug("Ran concurrentContextMetricsJVMLocalVarSet metrics"); - } - - /** - * Concurrent context metrics hazelcast. - * - * @throws IOException the IO exception - * @throws ApexException the apex exception - */ - private void concurrentContextMetricsHazelcast() throws ApexException { - if (configrationProvider.getJvmCount() != 1) { - return; - } - - LOGGER.debug("Running concurrentContextMetricsHazelcast metrics . . ."); - - final ContextParameters contextParameters = new ContextParameters(); - contextParameters.getDistributorParameters().setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS); - contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName()); - runConcurrentContextMetrics("Hazelcast"); - - LOGGER.debug("Ran concurrentContextMetricsHazelcast metrics"); - } - - /** - * Concurrent context metrics curator. - * - * @throws IOException the IO exception - * @throws ApexException the apex exception - */ - private void concurrentContextMetricsCurator() throws ApexException { - if (configrationProvider.getJvmCount() != 1) { - return; - } - - LOGGER.debug("Running concurrentContextMetricsCurator metrics . . ."); - - final ContextParameters contextParameters = new ContextParameters(); - contextParameters.getDistributorParameters().setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS); - - final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters(); - curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName()); - contextParameters.setLockManagerParameters(curatorParameters); - curatorParameters.setZookeeperAddress(zookeeperAddress); - - runConcurrentContextMetrics("Curator"); - - LOGGER.debug("Ran concurrentContextMetricsCurator metrics"); - } - - /** - * Concurrent context metrics hazelcast multi JVM hazelcast lock. - * - * @throws IOException the IO exception - * @throws ApexException the apex exception - */ - private void concurrentContextMetricsHazelcastMultiJvmHazelcastLock() throws ApexException { - LOGGER.debug("Running concurrentContextMetricsHazelcastMultiJVMHazelcastLock metrics . . ."); - - final ContextParameters contextParameters = new ContextParameters(); - final DistributorParameters distributorParameters = contextParameters.getDistributorParameters(); - distributorParameters.setPluginClass(HazelcastContextDistributor.class.getCanonicalName()); - contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName()); - runConcurrentContextMetrics("HazelcastMultiJVMHazelcastLock"); - - LOGGER.debug("Ran concurrentContextMetricsHazelcastMultiJVMHazelcastLock metrics"); - } - - /** - * Concurrent context metrics infinispan multi JVM hazelcastlock. - * - * @throws IOException the IO exception - * @throws ApexException the apex exception - */ - private void concurrentContextMetricsInfinispanMultiJvmHazelcastlock() throws ApexException { - LOGGER.debug("Running concurrentContextMetricsInfinispanMultiJVMHazelcastlock metrics . . ."); - - final ContextParameters contextParameters = new ContextParameters(); - final DistributorParameters distributorParameters = contextParameters.getDistributorParameters(); - distributorParameters.setPluginClass(InfinispanContextDistributor.class.getCanonicalName()); - contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName()); - - final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters(); - contextParameters.setDistributorParameters(infinispanParameters); - - runConcurrentContextMetrics("InfinispanMultiJVMHazelcastlock"); - - LOGGER.debug("Ran concurrentContextMetricsInfinispanMultiJVMHazelcastlock metrics"); - } - - /** - * Concurrent context metrics infinispan multi JVM curator lock. - * - * @throws IOException the IO exception - * @throws ApexException the apex exception - * @throws InterruptedException on interrupts - */ - private void concurrentContextMetricsInfinispanMultiJvmCuratorLock() - throws ApexException { - - LOGGER.debug("Running concurrentContextMetricsInfinispanMultiJVMCuratorLock metrics . . ."); - - final ZooKeeperServerServiceProvider zooKeeperServerServiceProvider = new ZooKeeperServerServiceProvider( - zookeeperDirectory, zookeeperAddress, zookeeperPort); - try { - zooKeeperServerServiceProvider.startZookeeperServer(); - final ContextParameters contextParameters = new ContextParameters(); - final DistributorParameters distributorParameters = contextParameters.getDistributorParameters(); - distributorParameters.setPluginClass(InfinispanContextDistributor.class.getCanonicalName()); - - final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters(); - curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName()); - contextParameters.setLockManagerParameters(curatorParameters); - curatorParameters.setZookeeperAddress(zookeeperAddress); - - final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters(); - contextParameters.setDistributorParameters(infinispanParameters); - - runConcurrentContextMetrics("InfinispanMultiJVMCuratorLock"); - } finally { - zooKeeperServerServiceProvider.stopZookeeperServer(); - } - LOGGER.debug("Ran concurrentContextMetricsInfinispanMultiJVMCuratorLock metrics"); - } - - /** - * Concurrent context metrics hazelcast multi JVM curator lock. - * - * @throws IOException the IO exception - * @throws ApexException the apex exception - * @throws InterruptedException on interrupts - */ - private void concurrentContextMetricsHazelcastMultiJvmCuratorLock() - throws ApexException { - LOGGER.debug("Running concurrentContextMetricsHazelcastMultiJVMCuratorLock metrics . . ."); - - final ZooKeeperServerServiceProvider zooKeeperServerServiceProvider = new ZooKeeperServerServiceProvider( - zookeeperDirectory, zookeeperAddress, zookeeperPort); - - try { - zooKeeperServerServiceProvider.startZookeeperServer(); - final ContextParameters contextParameters = new ContextParameters(); - final DistributorParameters distributorParameters = contextParameters.getDistributorParameters(); - distributorParameters.setPluginClass(HazelcastContextDistributor.class.getCanonicalName()); - - final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters(); - curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName()); - contextParameters.setLockManagerParameters(curatorParameters); - curatorParameters.setZookeeperAddress(zookeeperAddress); - - runConcurrentContextMetrics("HazelcastMultiJVMCuratorLock"); - } finally { - zooKeeperServerServiceProvider.stopZookeeperServer(); - } - LOGGER.debug("Ran concurrentContextMetricsHazelcastMultiJVMCuratorLock metrics"); - } - - /** - * Run concurrent context metrics. - * - * @param testName the test name - * @throws IOException the IO exception - * @throws ApexException the apex exception - */ - private void runConcurrentContextMetrics(final String testName) throws ApexException { - final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider); - - LOGGER.info("Running {} ...", testName); - final Map result = concurrentContext.testConcurrentContext(); - - long total = 0; - for (final Entry entry : result.entrySet()) { - LOGGER.trace("Album key: {}, value: {}", entry.getKey(), entry.getValue()); - total += entry.getValue().getLongValue(); - } - LOGGER.info("Album total value after execution: {}", total); - - LOGGER.info("Completed {} ...", testName); - } - - /** - * The main method. - * - * @param args the args - * @throws Exception the exception - */ - public static void main(final String[] args) throws Exception { - if (args.length != NUM_ARGS) { - String errorMessage = "Args: " + Arrays.toString(args) - + "\nusage: testLabel jvmCount threadCount threadLoops longArraySize lockType " - + "zookeeperAddress zookeeperPort zookeeperDirectory"; - LOGGER.info(errorMessage); - return; - } - - final ConfigrationProvider configrationProvider = new ConfigrationProviderImpl(args[ARG_LABEL], - Integer.valueOf(args[ARG_JVM_COUNT]), Integer.valueOf(args[ARG_THREAD_COUNT]), - Integer.valueOf(args[ARG_ITERATIONS]), Integer.valueOf(args[ARG_ARRAY_SIZE]), - Integer.valueOf(args[ARG_LOCK_TYPE])); - - final ConcurrentContextMetrics concurrentContextMetrics = new ConcurrentContextMetrics(configrationProvider, - args[ARG_ZOOKEEPER_ADDRESS], Integer.valueOf(args[ARG_ZOOKEEPER_PORT]), - args[ARG_ZOOKEEPER_DIRECTORY]); - - concurrentContextMetrics.concurrentContextMetricsJvmLocal(); - concurrentContextMetrics.concurrentContextMetricsCurator(); - concurrentContextMetrics.concurrentContextMetricsHazelcast(); - concurrentContextMetrics.concurrentContextMetricsHazelcastMultiJvmHazelcastLock(); - concurrentContextMetrics.concurrentContextMetricsInfinispanMultiJvmHazelcastlock(); - concurrentContextMetrics.concurrentContextMetricsInfinispanMultiJvmCuratorLock(); - concurrentContextMetrics.concurrentContextMetricsHazelcastMultiJvmCuratorLock(); - } -} diff --git a/testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/package-info.java b/testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/package-info.java deleted file mode 100644 index 9bb84d76b..000000000 --- a/testsuites/performance/performance-context-metrics/src/main/java/org/onap/policy/apex/testsuites/performance/context/metrics/package-info.java +++ /dev/null @@ -1,27 +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========================================================= - */ - -/** - * Used to get metrics on the performance of Context Album performance for various types of - * distribution and locking mechanisms in APEX. - * - * @author Liam Fallon (liam.fallon@ericsson.com) - */ -package org.onap.policy.apex.testsuites.performance.context.metrics; diff --git a/testsuites/performance/performance-context-metrics/src/site/css/site.css b/testsuites/performance/performance-context-metrics/src/site/css/site.css deleted file mode 100644 index ef8bd4d15..000000000 --- a/testsuites/performance/performance-context-metrics/src/site/css/site.css +++ /dev/null @@ -1,100 +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========================================================= - */ - -@import url(http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css); - - -/*************** Table definitions *******************/ - -tableblock > .title, .tableblock > caption { line-height: 1.4; color: #7a2518; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } - -.tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; } - -table.tableblock { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } -table.tableblock thead, table.tableblock tfoot { background: whitesmoke; font-weight: bold; } -table.tableblock thead tr th, table.tableblock thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #222222; text-align: left; } -table.tableblock tr th, table.tableblock tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #222222; } -table.tableblock tr.even, table.tableblock tr.alt, table.tableblock tr:nth-of-type(even) { background: #f9f9f9; } -table.tableblock thead tr th, table.tableblock tfoot tr th, table.tableblock tbody tr td, table.tableblock tr td, table.tableblock tfoot tr td { display: table-cell; line-height: 1.6; } - -table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; } - -table.tableblock.grid-all { border-collapse: separate; border-spacing: 1px; -webkit-border-radius: 4px; border-radius: 4px; border-top: 1px solid #dddddd; border-bottom: 1px solid #dddddd; } - -table.tableblock.frame-topbot, table.tableblock.frame-none { border-left: 0; border-right: 0; } - -table.tableblock.frame-sides, table.tableblock.frame-none { border-top: 0; border-bottom: 0; } - -table.tableblock td .paragraph:last-child p, table.tableblock td > p:last-child { margin-bottom: 0; } - -th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } - -th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } - -th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } - -th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } - -th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } - -th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } - -p.tableblock.header { color: #222222; font-weight: bold; } - - - -/*************** KBD Macro definitions *******************/ - -kbd.keyseq { color: #555555; } - -kbd:not(.keyseq) { display: inline-block; color: #222222; font-size: 0.75em; line-height: 1.4; background-color: #F7F7F7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; margin: -0.15em 0.15em 0 0.15em; padding: 0.2em 0.6em 0.2em 0.5em; vertical-align: middle; white-space: nowrap; } - -kbd kbd:first-child { margin-left: 0; } - -kbd kbd:last-child { margin-right: 0; } - - -/*************** Admontion Blocks definitions *******************/ -.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-align: left; font-weight: bold; } - -.admonitionblock > table { border: 0; background: none; width: 100%; margin-top: 1em; margin-bottom: 1em;} -.admonitionblock > table td.icon { text-align: center; width: 80px; } -.admonitionblock > table td.icon img { max-width: none; } -.admonitionblock > table td.icon .title { font-weight: bold; text-transform: uppercase; } -.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #6f6f6f; } -.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } - -.admonitionblock td.icon [class^="fa icon-"]:before {font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} -.admonitionblock td.icon .icon-note:before { content: "\f05a"; color: #005498; color: #003f72; } -.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 0.8); color: #111; } -.admonitionblock td.icon .icon-warning:before { content: "\f071"; color: #bf6900; } -.admonitionblock td.icon .icon-caution:before { content: "\f06d"; color: #bf3400; } -.admonitionblock td.icon .icon-important:before { content: "\f06a"; color: #bf0000; } - - - -/*************** Misc definitions *******************/ - -*:not(pre) > code { font-size: 0.9375em; padding: 1px 3px 0; white-space: nowrap; background-color: #f2f2f2; border: 1px solid #cccccc; -webkit-border-radius: 4px; border-radius: 4px; text-shadow: none; } - -pre, pre > code { line-height: 1.4; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; } - -code { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: #6d180b; } - diff --git a/testsuites/performance/performance-context-metrics/src/site/images/logos.png b/testsuites/performance/performance-context-metrics/src/site/images/logos.png deleted file mode 100644 index 915d6e59d..000000000 Binary files a/testsuites/performance/performance-context-metrics/src/site/images/logos.png and /dev/null differ diff --git a/testsuites/performance/performance-context-metrics/src/site/site.xml b/testsuites/performance/performance-context-metrics/src/site/site.xml deleted file mode 100644 index 937759ed5..000000000 --- a/testsuites/performance/performance-context-metrics/src/site/site.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file 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