Skip to content

Commit

Permalink
fix #4507: increasing integration deletion timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins authored and manusa committed Nov 4, 2022
1 parent e8747ed commit 6373a2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void testDeleteExistentResource() {
boolean isDeleted = client.secrets().withName(name).delete().size() == 1;
// Then
assertTrue(isDeleted);
client.secrets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.secrets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -66,7 +66,7 @@ void testDeleteWithGracePeriod() {
.withGracePeriod(0).delete().size() == 1;
// Then
assertTrue(isDeleted);
client.secrets().withName(name).waitUntilCondition(Objects::isNull, 5, TimeUnit.SECONDS);
client.secrets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -77,7 +77,7 @@ void testDeleteWithCascadingEnabled() {
boolean isDeleted = client.apps().replicaSets().withName(name).cascading(true).delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -90,7 +90,7 @@ void testDeleteWithPropagationPolicyForeground() {
.delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -103,7 +103,7 @@ void testDeleteWithPropagationPolicyBackground() {
.delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand Down Expand Up @@ -131,7 +131,7 @@ void testDeleteResource() {
boolean isDeleted = client.resource(replicaSet).delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -143,7 +143,7 @@ void testDeleteResourceCascading() {
boolean isDeleted = client.resource(replicaSet).cascading(true).delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -157,7 +157,7 @@ void testDeleteResourcePropagationPolicyBackground() {
.delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -171,7 +171,7 @@ void testDeleteResourcePropagationPolicyForeground() {
.delete().size() == 1;
// Then
assertTrue(isDeleted);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withName(name).waitUntilCondition(Objects::isNull, 60, TimeUnit.SECONDS);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void testDeleteExistingWithOrphanDeletion() throws Exception {
resource.withGracePeriod(0L).delete();
resource.waitUntilCondition(Objects::isNull, 30, TimeUnit.SECONDS);
client.apps().replicaSets().withLabel("run", deploymentName).informOnCondition(Collection::isEmpty)
.get(30, TimeUnit.SECONDS);
.get(60, TimeUnit.SECONDS);
resource.create();

List<ReplicaSet> replicaSets = client.apps().replicaSets().withLabel("run", deploymentName)
Expand All @@ -155,7 +155,7 @@ void testDeleteExistingWithOrphanDeletion() throws Exception {
assertTrue(resource.withGracePeriod(0L).delete().size() == 1);
// Check whether child resources are also deleted
client.apps().replicaSets().withLabel("run", deploymentName).informOnCondition(List::isEmpty)
.get(30, TimeUnit.SECONDS);
.get(60, TimeUnit.SECONDS);
}

@Test
Expand Down Expand Up @@ -188,7 +188,7 @@ void testDeleteExistingWithoutOrphanDeletion() throws Exception {
assertTrue(resource.withPropagationPolicy(DeletionPropagation.FOREGROUND).withGracePeriod(0L).delete().size() == 1);
// Check whether child resources are also deleted
client.apps().replicaSets().withLabel("run", deploymentName).informOnCondition(List::isEmpty)
.get(30, TimeUnit.SECONDS);
.get(60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -206,7 +206,7 @@ void testDeletionWithOrphanDeletion() throws Exception {

// Check whether child resources are also deleted
client.apps().replicaSets().withLabel("run", deploymentName).informOnCondition(List::isEmpty)
.get(30, TimeUnit.SECONDS);
.get(60, TimeUnit.SECONDS);
}

@Test
Expand All @@ -224,7 +224,7 @@ void testDeletionWithoutOrphanDeletion() throws Exception {

// wait till deployment is deleted
client.apps().deployments().withLabel("run", deploymentName)
.informOnCondition(List::isEmpty).get(30, TimeUnit.SECONDS);
.informOnCondition(List::isEmpty).get(60, TimeUnit.SECONDS);

// Check whether child resources are not deleted, they should be alive
client.apps().replicaSets().withLabel("run", deploymentName).informOnCondition(l -> l.size() == 1)
Expand Down

0 comments on commit 6373a2e

Please sign in to comment.