From 487061f35d918536c6ce8ec6fe7e0ee70532aedc Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 12 Sep 2018 16:55:02 -0400 Subject: Stability fixes sdnc now logs the full response message as a json removed erroneous encoding of variables with full XML Return created network from getVirtualLinkL3Network added exception logger to workflowaction aai check Check for null value for vnfcPorts before referencing it Added test case for invalid camunda response Changed to use updateStatus method Added saving for currentActiveReq and test for 401 resp Change JUnit to use expectedException and clean up unused items. Add vfModuleId to the exception message for missing model info. Report an error if VF Module model info is expected but is null. - Just renamed the Cvnfc and Vnfc set names - Updated code to check for duplicate VNFC's across multiple modules in the same VNF. - Removed commented out if statement line for ALLOTTED_RESOURCE - Reinitialize the Cvnfc and Vnfc Sets each time we iterate the VFModule loop. This will avoid the concurrent modification exception. Eliminated Ben from the sample request Changed to use else if for null check Added null check before catdb call and test case Fix implementation of a call to VNF Adapter for DeleteVolumeGroupBB. Update the method to no call save and do a put Revert usage of PUT method, use save instead Change-Id: I9f69fb68d0639c23b8e1de6931938119bd3ac54b Issue-ID: SO-1032 Signed-off-by: Benjamin, Max (mb388a) --- .../java/org/onap/so/bpmn/common/WorkflowTest.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'bpmn/mso-infrastructure-bpmn/src/test/java/org') diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java index 9dadb8b623..041afe398b 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java @@ -141,7 +141,8 @@ public abstract class WorkflowTest { */ protected static final String JSON = "application/json; charset=UTF-8"; - + private static final int timeout = 2000; + /** * Constructor. */ @@ -580,10 +581,27 @@ public abstract class WorkflowTest { * reserve, assign, delete:ERR * * Errors are handled with junit assertions and will cause the test to fail. + * Uses the static/default timeout value for backward compatibility. * @param callbacks an object containing callback data for the program * @param program the program to execute */ protected void injectSDNCCallbacks(CallbackSet callbacks, String program) { + injectSDNCCallbacks(callbacks, program, timeout); + } + + /** + * Runs a program to inject SDNC callback data into the test environment. + * A program is essentially just a list of keys that identify callback data + * to be injected, in sequence. An example program: + *
+	 *     reserve, assign, delete:ERR
+	 * 
+ * Errors are handled with junit assertions and will cause the test to fail. + * @param callbacks an object containing callback data for the program + * @param program the program to execute + * @param timeout a timeout value to wait for the callback + */ + protected void injectSDNCCallbacks(CallbackSet callbacks, String program, int timeout) { String[] cmds = program.replaceAll("\\s+", "").split(","); -- cgit 1.2.3-korg