mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix unit test
This commit is contained in:
parent
cd63800d15
commit
bb1443d270
@ -157,7 +157,7 @@ public class VeeamClientTest {
|
||||
@Test
|
||||
public void checkIfRestoreSessionFinishedTestTimeoutException() throws IOException {
|
||||
try {
|
||||
ReflectionTestUtils.setField(mockClient, "restoreTimeout", 10);
|
||||
ReflectionTestUtils.setField(mockClient, "restoreTimeout", 2);
|
||||
RestoreSession restoreSession = Mockito.mock(RestoreSession.class);
|
||||
HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
|
||||
Mockito.when(mockClient.get(Mockito.anyString())).thenReturn(httpResponse);
|
||||
@ -169,7 +169,7 @@ public class VeeamClientTest {
|
||||
} catch (Exception e) {
|
||||
Assert.assertEquals("Related job type: RestoreTest was not successful", e.getMessage());
|
||||
}
|
||||
Mockito.verify(mockClient, times(10)).get(Mockito.anyString());
|
||||
Mockito.verify(mockClient, Mockito.atLeastOnce()).get(Mockito.anyString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user