aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-context-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/integration/integration-context-test/src')
-rw-r--r--testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java (renamed from testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java)87
1 files changed, 78 insertions, 9 deletions
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java
index dd6c4e6f1..5fadb2279 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.plugins.context.test.locking;
+package org.onap.policy.apex.testsuites.integration.context;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -95,6 +95,11 @@ public class TestConcurrentContext {
private ZooKeeperServerServiceProvider zooKeeperServerServiceProvider;
+ /**
+ * Configure.
+ *
+ * @throws Exception the exception
+ */
@BeforeClass
public static void configure() throws Exception {
System.setProperty(JAVA_NET_PREFER_IPV4_STACK, "true");
@@ -111,6 +116,11 @@ public class TestConcurrentContext {
}
+ /**
+ * Start zookeeper server.
+ *
+ * @throws Exception the exception
+ */
private void startZookeeperServer() throws Exception {
final File zookeeperDirectory = folder.newFolder("zookeeperDirectory");
@@ -120,14 +130,22 @@ public class TestConcurrentContext {
zooKeeperServerServiceProvider.startZookeeperServer();
}
+ /**
+ * Stop zookeeper server.
+ */
private void stopZookeeperServer() {
if (zooKeeperServerServiceProvider != null) {
zooKeeperServerServiceProvider.stopZookeeperServer();
}
}
+ /**
+ * Test concurrent context jvm local var set.
+ *
+ * @throws Exception the exception
+ */
@Test
- public void testConcurrentContextJVMLocalVarSet() throws Exception {
+ public void testConcurrentContextJvmLocalVarSet() throws Exception {
logger.debug("Running testConcurrentContextJVMLocalVarSet test . . .");
final ContextParameters contextParameters = new ContextParameters();
@@ -149,8 +167,13 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextJVMLocalVarSet test");
}
+ /**
+ * Test concurrent context jvm local no var set.
+ *
+ * @throws Exception the exception
+ */
@Test
- public void testConcurrentContextJVMLocalNoVarSet() throws Exception {
+ public void testConcurrentContextJvmLocalNoVarSet() throws Exception {
logger.debug("Running testConcurrentContextJVMLocalNoVarSet test . . .");
new ContextParameters();
@@ -168,8 +191,13 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextJVMLocalNoVarSet test");
}
+ /**
+ * Test concurrent context multi jvm no lock.
+ *
+ * @throws Exception the exception
+ */
@Test
- public void testConcurrentContextMultiJVMNoLock() throws Exception {
+ public void testConcurrentContextMultiJvmNoLock() throws Exception {
logger.debug("Running testConcurrentContextMultiJVMNoLock test . . .");
final ContextParameters contextParameters = new ContextParameters();
@@ -190,6 +218,11 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextMultiJVMNoLock test");
}
+ /**
+ * Test concurrent context hazelcast lock.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testConcurrentContextHazelcastLock() throws Exception {
logger.debug("Running testConcurrentContextHazelcastLock test . . .");
@@ -212,6 +245,11 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextHazelcastLock test");
}
+ /**
+ * Test concurrent context curator lock.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testConcurrentContextCuratorLock() throws Exception {
logger.debug("Running testConcurrentContextCuratorLock test . . .");
@@ -243,8 +281,13 @@ public class TestConcurrentContext {
}
}
+ /**
+ * Test concurrent context hazelcast multi jvm hazelcast lock.
+ *
+ * @throws Exception the exception
+ */
@Test
- public void testConcurrentContextHazelcastMultiJVMHazelcastLock() throws Exception {
+ public void testConcurrentContextHazelcastMultiJvmHazelcastLock() throws Exception {
logger.debug("Running testConcurrentContextHazelcastMultiJVMHazelcastLock test . . .");
final ContextParameters contextParameters = new ContextParameters();
@@ -265,8 +308,15 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextHazelcastMultiJVMHazelcastLock test");
}
+ /**
+ * Test concurrent context infinispan multi jvm hazelcastlock.
+ *
+ * @throws ApexModelException the apex model exception
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws ApexException the apex exception
+ */
@Test
- public void testConcurrentContextInfinispanMultiJVMHazelcastlock()
+ public void testConcurrentContextInfinispanMultiJvmHazelcastlock()
throws ApexModelException, IOException, ApexException {
logger.debug("Running testConcurrentContextInfinispanMultiJVMHazelcastlock test . . .");
@@ -290,8 +340,13 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextInfinispanMultiJVMHazelcastlock test");
}
+ /**
+ * Test concurrent context infinispan multi jvm curator lock.
+ *
+ * @throws Exception the exception
+ */
@Test
- public void testConcurrentContextInfinispanMultiJVMCuratorLock() throws Exception {
+ public void testConcurrentContextInfinispanMultiJvmCuratorLock() throws Exception {
logger.debug("Running testConcurrentContextInfinispanMultiJVMCuratorLock test . . .");
try {
@@ -326,8 +381,13 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextInfinispanMultiJVMCuratorLock test");
}
+ /**
+ * Test concurrent context hazelcast multi jvm curator lock.
+ *
+ * @throws Exception the exception
+ */
@Test
- public void testConcurrentContextHazelcastMultiJVMCuratorLock() throws Exception {
+ public void testConcurrentContextHazelcastMultiJvmCuratorLock() throws Exception {
logger.debug("Running testConcurrentContextHazelcastMultiJVMCuratorLock test . . .");
try {
@@ -358,6 +418,15 @@ public class TestConcurrentContext {
logger.debug("Ran testConcurrentContextHazelcastMultiJVMCuratorLock test");
}
+ /**
+ * Gets the configration provider.
+ *
+ * @param testType the test type
+ * @param jvmCount the jvm count
+ * @param threadCount the thread count
+ * @param threadLoops the thread loops
+ * @return the configration provider
+ */
ConfigrationProvider getConfigrationProvider(final String testType, final int jvmCount, final int threadCount,
final int threadLoops) {
return new ConfigrationProviderImpl(testType, jvmCount, threadCount, threadLoops, 16,
@@ -365,7 +434,7 @@ public class TestConcurrentContext {
@Override
public Map<String, Object> getContextAlbumInitValues() {
final Map<String, Object> initValues = super.getContextAlbumInitValues();
- initValues.put(TEST_VALUE, new TestContextLongItem(0l));
+ initValues.put(TEST_VALUE, new TestContextLongItem(0L));
return initValues;
}