Small changes to test
This commit is contained in:
parent
cff4f35b9a
commit
aa00631246
@ -246,7 +246,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
||||||
|
|
||||||
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
verifyNoAlarms(device.getId());
|
verifyNoAlarms(device.getId());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -260,7 +260,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
doDelete("/api/asset/" + asset.getId()).andExpect(status().isOk());
|
doDelete("/api/asset/" + asset.getId()).andExpect(status().isOk());
|
||||||
|
|
||||||
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
verifyNoAlarms(asset.getId());
|
verifyNoAlarms(asset.getId());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
doDelete("/api/dashboard/" + dashboard.getId()).andExpect(status().isOk());
|
doDelete("/api/dashboard/" + dashboard.getId()).andExpect(status().isOk());
|
||||||
|
|
||||||
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
verifyNoAlarms(dashboard.getId());
|
verifyNoAlarms(dashboard.getId());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -399,7 +399,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
||||||
|
|
||||||
int attempts = 2;
|
int attempts = 2;
|
||||||
await().atMost(30, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
for (int i = 0; i <= attempts; i++) {
|
for (int i = 0; i <= attempts; i++) {
|
||||||
int attempt = i;
|
int attempt = i;
|
||||||
verify(housekeeperReprocessingService).submitForReprocessing(argThat(getTaskMatcher(device.getId(), HousekeeperTaskType.DELETE_TS_HISTORY,
|
verify(housekeeperReprocessingService).submitForReprocessing(argThat(getTaskMatcher(device.getId(), HousekeeperTaskType.DELETE_TS_HISTORY,
|
||||||
@ -409,7 +409,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
assertThat(getTimeseriesHistory(device.getId())).isNotEmpty();
|
assertThat(getTimeseriesHistory(device.getId())).isNotEmpty();
|
||||||
doCallRealMethod().when(tsHistoryDeletionTaskProcessor).process(any());
|
doCallRealMethod().when(tsHistoryDeletionTaskProcessor).process(any());
|
||||||
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
assertThat(getTimeseriesHistory(device.getId())).isEmpty();
|
assertThat(getTimeseriesHistory(device.getId())).isEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
||||||
|
|
||||||
int attempts = 2;
|
int attempts = 2;
|
||||||
await().atMost(30, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
for (int i = 0; i <= attempts; i++) {
|
for (int i = 0; i <= attempts; i++) {
|
||||||
int attempt = i;
|
int attempt = i;
|
||||||
verify(housekeeperReprocessingService).submitForReprocessing(argThat(getTaskMatcher(device.getId(), HousekeeperTaskType.DELETE_TS_HISTORY,
|
verify(housekeeperReprocessingService).submitForReprocessing(argThat(getTaskMatcher(device.getId(), HousekeeperTaskType.DELETE_TS_HISTORY,
|
||||||
@ -457,7 +457,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
doCallRealMethod().when(tsHistoryDeletionTaskProcessor).process(any());
|
doCallRealMethod().when(tsHistoryDeletionTaskProcessor).process(any());
|
||||||
someExecutor.shutdown();
|
someExecutor.shutdown();
|
||||||
|
|
||||||
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
assertThat(getTimeseriesHistory(device.getId())).isEmpty();
|
assertThat(getTimeseriesHistory(device.getId())).isEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -473,7 +473,7 @@ public class HousekeeperServiceTest extends AbstractControllerTest {
|
|||||||
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
doDelete("/api/device/" + device.getId()).andExpect(status().isOk());
|
||||||
|
|
||||||
int maxAttempts = 5;
|
int maxAttempts = 5;
|
||||||
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
|
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||||
for (int i = 1; i <= maxAttempts; i++) {
|
for (int i = 1; i <= maxAttempts; i++) {
|
||||||
verifyTaskProcessing(device.getId(), HousekeeperTaskType.DELETE_TS_HISTORY, i);
|
verifyTaskProcessing(device.getId(), HousekeeperTaskType.DELETE_TS_HISTORY, i);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user