private static final long serialVersionUID = 7241008665286367796L;
- private boolean flag = false;;
+ private boolean flag = false;
/**
* The Constructor.
try {
externalContextAlbum.put("TestExternalContextItem00A", null);
} catch (final ContextRuntimeException e) {
- assertEquals(
- "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()",
- e.getMessage());
+ assertEquals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key "
+ + "\"TestExternalContextItem00A\" for put()", e.getMessage());
}
assertEquals(tciAA, externalContextItem.getTestExternalContextItem00A());
try {
externalContextAlbum.put("TestExternalContextItem00A", null);
} catch (final ContextRuntimeException e) {
- assert (e.getMessage().equals(
- "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()"));
+ assert (e.getMessage().equals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key "
+ + "\"TestExternalContextItem00A\" for put()"));
}
assertTrue(externalContextAlbum.get(EXTERNAL_CONTEXT).equals(externalContext));
try {
externalContextAlbum.put("TestExternalContextItemFFF", null);
} catch (final ContextRuntimeException e) {
- assert (e.getMessage().equals(
- "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()"));
+ assert (e.getMessage().equals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key "
+ + "\"TestExternalContextItemFFF\" for put()"));
}
assertEquals(1, externalContextAlbum.size());
try {
externalContextAlbum.put("TestExternalContextItemFFF", null);
} catch (final ContextRuntimeException e) {
- assertEquals(
- "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()",
- e.getMessage());
+ assertEquals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key "
+ + "\"TestExternalContextItemFFF\" for put()", e.getMessage());
}
assertEquals(1, externalContextAlbum.size());
longContextAlbum.put(_0, ZERO);
fail(EXCEPTION_MESSAGE);
} catch (final ContextRuntimeException e) {
- assertEquals(
- "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"zero\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"",
- e.getMessage());
+ assertEquals("Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\":"
+ + " LongContextAlbum:0.0.1: object \"zero\" of class \"java.lang.String\" not compatible with"
+ + " class \"java.lang.Long\"", e.getMessage());
}
try {
fail(EXCEPTION_MESSAGE);
} catch (final ContextRuntimeException e) {
assertEquals(
- "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"",
+ "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum"
+ + ":0.0.1: object \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"",
e.getMessage());
}
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.lock.modifier;
import org.onap.policy.apex.context.ContextAlbum;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.lock.modifier;
import org.onap.policy.apex.context.ContextRuntimeException;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.lock.modifier;
import java.util.Random;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.lock.modifier;
import java.util.Random;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.lock.modifier;
import static org.onap.policy.apex.context.test.utils.Constants.TEST_VALUE;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.lock.modifier;
import java.util.Random;
// An even number of arguments greater than 3
if (args.length < 9) {
LOGGER.error("invalid arguments: " + Arrays.toString(args));
- LOGGER.error(
- "usage: TestConcurrentContextJVM testType jvmNo threadCount threadLoops albumSize lockType [parameterKey parameterJson].... ");
+ LOGGER.error("usage: TestConcurrentContextJVM testType jvmNo threadCount threadLoops albumSize "
+ + "lockType [parameterKey parameterJson].... ");
return;
}
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.utils;
import java.util.Map;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.utils;
import java.util.HashMap;
public Map<String, Object> getContextAlbumInitValues() {
final Map<String, Object> values = new HashMap<>();
for (int i = 0; i < albumSize; i++) {
- values.put(Integer.toString(i), new TestContextLongItem(0l));
+ values.put(Integer.toString(i), new TestContextLongItem(0L));
}
return values;
}
private static final AxArtifactKey KEY3 = new AxArtifactKey("testC-bot", VERSION);
private static final AxArtifactKey KEY2 = new AxArtifactKey("testC-next", VERSION);
- private static final AxArtifactKey[] USED_ARTIFACT_STACK_ARRAY = new AxArtifactKey[] {KEY, KEY2, KEY3};;
+ private static final AxArtifactKey[] USED_ARTIFACT_STACK_ARRAY = new AxArtifactKey[] {KEY, KEY2, KEY3};
public static final AxArtifactKey[] getAxArtifactKeyArray() {
return USED_ARTIFACT_STACK_ARRAY;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.utils;
import java.util.concurrent.ThreadFactory;
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.utils;
import java.net.InetAddress;
* function sets the address to be the first non-loopback IPv4 address on a host
*
* @return Set of IPv4 addresses
- * @throws SocketException
+ * @throws SocketException throw socket exception if error occurs
*/
public static TreeSet<String> getIPv4NonLoopAddresses() throws SocketException {
final TreeSet<String> ipAddressSet = new TreeSet<String>();
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.test.utils;
import java.io.File;
package org.onap.policy.apex.context.test.distribution;
-
import java.io.IOException;
-
import org.junit.After;
import org.junit.Test;
import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
package org.onap.policy.apex.context.test.distribution;
-
import java.io.IOException;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
package org.onap.policy.apex.context.test.distribution;
-
import java.io.IOException;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
package org.onap.policy.apex.context.test.locking;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@Override
public Map<String, Object> getContextAlbumInitValues() {
final Map<String, Object> initValues = super.getContextAlbumInitValues();
- initValues.put(Constants.TEST_VALUE, new TestContextLongItem(0l));
+ initValues.put(Constants.TEST_VALUE, new TestContextLongItem(0L));
return initValues;
}
};
import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.PersistorParameters;
-import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
contextAlbumForMap.putAll(valueMap0);
- assertEquals(((TestContextTreeMapItem) contextAlbumForMap.get("TestPolicyContextItem000")).getMapValue().get("key"),
+ assertEquals(
+ ((TestContextTreeMapItem) contextAlbumForMap.get("TestPolicyContextItem000")).getMapValue().get("key"),
"This is a policy context string");
contextAlbumForMap.flush();