aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/test/java
diff options
context:
space:
mode:
authorBoslet, Cory <cory.boslet@att.com>2020-11-19 18:10:56 -0500
committerk.kedron <k.kedron@partner.samsung.com>2021-02-26 14:05:51 +0100
commit1c7b9ee675bf79c192f04d8723f3f935f8f8534c (patch)
tree766c0f4503d7e2236d3904215bedeb49682001e5 /adapters/mso-openstack-adapters/src/test/java
parent16b4369694a865a1c4bfaa6b562562ecbd102ed3 (diff)
Use the timeout from the heat templates for
Use the timeout from the heat templates for polling Removed unused imports and code from base Added to get timeout from the rest client Fixed unit test for polling to account for changes Issue-ID: SO-3397 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: If633f4f49d88eb797020b7d72c6edd0fbee0926c
Diffstat (limited to 'adapters/mso-openstack-adapters/src/test/java')
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/PollServiceTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/PollServiceTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/PollServiceTest.java
index 60826705fd..0214fdd265 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/PollServiceTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/PollServiceTest.java
@@ -52,15 +52,17 @@ public class PollServiceTest {
Mockito.when(mockExternalTask.getVariable("openstackAdapterTaskRequest")).thenReturn(xmlString);
Mockito.when(mockExternalTask.getVariable("PollRollbackStatus")).thenReturn(false);
Mockito.when(mockExternalTask.getVariable("stackId")).thenReturn("stackId/stack123");
- Mockito.when(msoHeatUtils.pollStackForStatus(eq(1), any(Stack.class), eq("CREATE_IN_PROGRESS"), eq("regionOne"),
- eq("0422ffb57ba042c0800a29dc85ca70f8"), eq(false))).thenReturn(new Stack());
+ Mockito.when(msoHeatUtils.pollStackForStatus(eq(118), any(Stack.class), eq("CREATE_IN_PROGRESS"),
+ eq("regionOne"), eq("0422ffb57ba042c0800a29dc85ca70f8"), eq(false))).thenReturn(new Stack());
+ Mockito.when(msoHeatUtils.getVfHeatTimeoutValue(any(), eq(false))).thenReturn(118);
// Mockito.doNothing().when(msoHeatUtils).postProcessStackCreate(Mockito.any(), Mockito.any(), Mockito.any(),
// Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any());
pollService.executeExternalTask(mockExternalTask, mockExternalTaskService);
- Mockito.verify(msoHeatUtils).pollStackForStatus(eq(1), any(Stack.class), eq("CREATE_IN_PROGRESS"),
+ Mockito.verify(msoHeatUtils).pollStackForStatus(eq(118), any(Stack.class), eq("CREATE_IN_PROGRESS"),
eq("regionOne"), eq("0422ffb57ba042c0800a29dc85ca70f8"), eq(false));
+ Mockito.verify(msoHeatUtils).getVfHeatTimeoutValue(any(), eq(false));
}
@@ -72,16 +74,16 @@ public class PollServiceTest {
Mockito.when(mockExternalTask.getVariable("openstackAdapterTaskRequest")).thenReturn(xmlString);
Mockito.when(mockExternalTask.getVariable("PollRollbackStatus")).thenReturn(true);
Mockito.when(mockExternalTask.getVariable("stackId")).thenReturn("stackId/stack123");
- Mockito.when(msoHeatUtils.pollStackForStatus(eq(1), any(), eq("DELETE_IN_PROGRESS"), eq("regionOne"),
+ Mockito.when(msoHeatUtils.pollStackForStatus(eq(118), any(), eq("DELETE_IN_PROGRESS"), eq("regionOne"),
eq("0422ffb57ba042c0800a29dc85ca70f8"), eq(true))).thenReturn(new Stack());
Mockito.doNothing().when(msoHeatUtils).postProcessStackDelete(Mockito.any());
-
+ Mockito.when(msoHeatUtils.getVfHeatTimeoutValue(any(), eq(false))).thenReturn(118);
pollService.executeExternalTask(mockExternalTask, mockExternalTaskService);
- Mockito.verify(msoHeatUtils).pollStackForStatus(eq(1), any(), eq("DELETE_IN_PROGRESS"), eq("regionOne"),
+ Mockito.verify(msoHeatUtils).pollStackForStatus(eq(118), any(), eq("DELETE_IN_PROGRESS"), eq("regionOne"),
eq("0422ffb57ba042c0800a29dc85ca70f8"), eq(true));
-
+ Mockito.verify(msoHeatUtils).getVfHeatTimeoutValue(any(), eq(false));
}
}