diff options
author | Boslet, Cory <cory.boslet@att.com> | 2020-11-19 18:10:56 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2021-01-05 10:38:41 -0500 |
commit | 8bc7057f9b23555ba78c9f656743c57fa3d62a64 (patch) | |
tree | c0ee0e9e8043c22d4a7d9778645b621b43603a4b /adapters/mso-openstack-adapters/src/test/java/org/onap | |
parent | e036ebd43a0b58eda96b2546290bba2189bb3824 (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>
Change-Id: If633f4f49d88eb797020b7d72c6edd0fbee0926c
Diffstat (limited to 'adapters/mso-openstack-adapters/src/test/java/org/onap')
-rw-r--r-- | adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/PollServiceTest.java | 16 |
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)); } } |