Skip to content

Commit 7f76347

Browse files
committed
test improvement
1 parent f830f6a commit 7f76347

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

operator-framework/src/test/java/io/javaoperatorsdk/operator/StandaloneBulkDependentIT.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.javaoperatorsdk.operator;
22

3+
import java.time.Duration;
4+
35
import org.junit.jupiter.api.Test;
46
import org.junit.jupiter.api.extension.RegisterExtension;
57

@@ -40,13 +42,14 @@ void managesBulkConfigMaps() {
4042
}
4143

4244
void assertNumberOfConfigMaps(int n) {
43-
await().untilAsserted(() -> {
44-
var cms = operator.getKubernetesClient().configMaps().inNamespace(operator.getNamespace())
45-
.withLabel(LABEL_KEY, LABEL_VALUE)
46-
.list().getItems();
47-
assertThat(cms).withFailMessage("Number of items is still: " + cms.size())
48-
.hasSize(n);
49-
});
45+
await().atMost(Duration.ofSeconds(20))
46+
.untilAsserted(() -> {
47+
var cms = operator.getKubernetesClient().configMaps().inNamespace(operator.getNamespace())
48+
.withLabel(LABEL_KEY, LABEL_VALUE)
49+
.list().getItems();
50+
assertThat(cms).withFailMessage("Number of items is still: " + cms.size())
51+
.hasSize(n);
52+
});
5053
}
5154

5255
private void updateSpecWithNumber(int n) {

0 commit comments

Comments
 (0)