aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-06-09 10:38:07 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-06-09 10:38:13 -0400
commit6ce8eb0b4cf2b5e082f1506067bb40173c0f4180 (patch)
tree371dec03bce73d2e86305e17396c6cc7dd0a9fa3
parent242e71883f59b8ad971f77c9bbdf032527fd77c0 (diff)
Switched name and id, and updated tests
Switched name and id, and updated tests Change-Id: Ica8251be71d2fd9362e4f209755d80bc36ccbf66 Issue-ID: SO-2000 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java4
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java
index df173c002d..625b584257 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java
@@ -28,8 +28,8 @@ public class StackStatusHandler {
String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID);
String stackStatus = mapper.writeValueAsString(stack);
RequestProcessingData requestProcessingData =
- requestDBClient.getRequestProcessingDataBySoRequestIdAndNameAndGrouping(requestId, stack.getId(),
- stack.getStackName());
+ requestDBClient.getRequestProcessingDataBySoRequestIdAndNameAndGrouping(requestId,
+ stack.getStackName(), stack.getId());
if (requestProcessingData == null) {
requestProcessingData = new RequestProcessingData();
requestProcessingData.setGroupingId(stack.getId());
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java
index 54e2bbf06d..0d5cd6a118 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java
@@ -33,7 +33,7 @@ public class StackStatusHandlerTest {
requestProcessingData.setValue("testMe");
doReturn(requestProcessingData).when(requestDBClient)
- .getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "id", "stackName");
+ .getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "stackName", "id");
Stack latestStack = new Stack();
latestStack.setId("id");
latestStack.setStackName("stackName");
@@ -48,8 +48,8 @@ public class StackStatusHandlerTest {
@Test
public final void record_Not_Exists_Test() throws MsoException, IOException {
ArgumentCaptor<RequestProcessingData> requestCaptor = ArgumentCaptor.forClass(RequestProcessingData.class);
- doReturn(null).when(requestDBClient).getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "id",
- "stackName");
+ doReturn(null).when(requestDBClient).getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "stackName",
+ "id");
Stack latestStack = new Stack();
latestStack.setId("id");
latestStack.setStackName("stackName");