Skip to content

Commit bb1443d

Browse files
committed
fix unit test
1 parent cd63800 commit bb1443d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/backup/veeam/src/test/java/org/apache/cloudstack/backup/veeam/VeeamClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public void getRepositoryNameFromJobTestSuccess() throws Exception {
157157
@Test
158158
public void checkIfRestoreSessionFinishedTestTimeoutException() throws IOException {
159159
try {
160-
ReflectionTestUtils.setField(mockClient, "restoreTimeout", 10);
160+
ReflectionTestUtils.setField(mockClient, "restoreTimeout", 2);
161161
RestoreSession restoreSession = Mockito.mock(RestoreSession.class);
162162
HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
163163
Mockito.when(mockClient.get(Mockito.anyString())).thenReturn(httpResponse);
@@ -169,7 +169,7 @@ public void checkIfRestoreSessionFinishedTestTimeoutException() throws IOExcepti
169169
} catch (Exception e) {
170170
Assert.assertEquals("Related job type: RestoreTest was not successful", e.getMessage());
171171
}
172-
Mockito.verify(mockClient, times(10)).get(Mockito.anyString());
172+
Mockito.verify(mockClient, Mockito.atLeastOnce()).get(Mockito.anyString());
173173
}
174174

175175
@Test

0 commit comments

Comments
 (0)