Skip to content

Commit

Permalink
Convert poll internal to seconds for pods stability
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless committed Jan 16, 2024
1 parent 737de20 commit dad2c59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/odh/test/utils/PodUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static void verifyThatPodsAreStable(String namespaceName, LabelSelector l
if (pod.getStatus().getPhase().equals(phase)) {
LOGGER.debug("Pod: {}/{} is in the {} state. Remaining seconds for Pod to be stable {}",
namespaceName, pod.getMetadata().getName(), pod.getStatus().getPhase(),
TestConstants.GLOBAL_STABILITY_TIME / TestConstants.GLOBAL_POLL_INTERVAL_SHORT - stabilityCounter[0]);
TestConstants.GLOBAL_STABILITY_TIME / (TestConstants.GLOBAL_POLL_INTERVAL_SHORT / 1000) - stabilityCounter[0]);
} else {
LOGGER.warn("Pod: {}/{} is not stable in phase following phase {} ({}) reset the stability counter from {}s to {}s",
namespaceName, pod.getMetadata().getName(), pod.getStatus().getPhase(), phase, stabilityCounter[0], 0);
Expand All @@ -132,7 +132,7 @@ public static void verifyThatPodsAreStable(String namespaceName, LabelSelector l
}
stabilityCounter[0]++;

if (stabilityCounter[0] == TestConstants.GLOBAL_STABILITY_TIME / TestConstants.GLOBAL_POLL_INTERVAL_SHORT) {
if (stabilityCounter[0] == TestConstants.GLOBAL_STABILITY_TIME / (TestConstants.GLOBAL_POLL_INTERVAL_SHORT / 1000)) {
LOGGER.info("All Pods are stable {}", actualPods.stream().map(p -> p.getMetadata().getName()).collect(Collectors.joining(" ,")));
return true;
}
Expand Down

0 comments on commit dad2c59

Please sign in to comment.