Skip to content

Commit

Permalink
Fix reliability issue with test case
Browse files Browse the repository at this point in the history
Signed-off-by: MichaelMorris <michael.morris@est.tech>
  • Loading branch information
MichaelMorrisEst committed Sep 24, 2024
1 parent a09c20e commit 23fff45
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ public void testDeploymentController() {
.build();

client.apps().deployments().inNamespace(namespace).resource(dep).create();

TestUtils.waitFor("Wait for deployment to have status", 100L, 10_000L, () -> client.apps().deployments().inNamespace(namespace).withName(deploymentName).get() != null && client.apps().deployments().inNamespace(namespace).withName(deploymentName).get().getStatus() != null);

TestUtils.waitFor("Wait for deployment to have status", 100L, 10_000L,
() -> client.apps().deployments().inNamespace(namespace).withName(deploymentName).get() != null
&& client.apps().deployments().inNamespace(namespace).withName(deploymentName).get().getStatus() != null
&& client.apps().deployments().inNamespace(namespace).withName(deploymentName).get().getStatus().getObservedGeneration() != null);

Deployment createdDeployment = client.apps().deployments().inNamespace(namespace).withName(deploymentName).get();
assertThat(createdDeployment, is(notNullValue()));
Expand Down

0 comments on commit 23fff45

Please sign in to comment.