Skip to content

Commit 3423a1e

Browse files
committed
add additional null checks as this check is sometimes flaky on CI
1 parent 454a4b1 commit 3423a1e

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator/ClusterConnectionCreate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected ClusterConnection create(int index) {
100100
.inNamespace(namespace)
101101
.withName(name)
102102
.waitUntilCondition(
103-
clusterConnection -> clusterConnection.getStatus() != null,
103+
clusterConnection -> clusterConnection != null && clusterConnection.getStatus() != null,
104104
5,
105105
TimeUnit.SECONDS
106106
);

operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator/DatabaseCreate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected Database create(int index) {
9494
.inNamespace(namespace)
9595
.withName(name)
9696
.waitUntilCondition(
97-
db -> db.getStatus() != null,
97+
db -> db != null && db.getStatus() != null,
9898
5,
9999
TimeUnit.SECONDS
100100
);

operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator/DefaultPrivilegeCreate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected DefaultPrivilege create(int index) {
134134
.inNamespace(namespace)
135135
.withName(name)
136136
.waitUntilCondition(
137-
defaultPrivilege -> defaultPrivilege.getStatus() != null,
137+
defaultPrivilege -> defaultPrivilege != null && defaultPrivilege.getStatus() != null,
138138
5,
139139
TimeUnit.SECONDS
140140
);

operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator/GrantCreate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ protected Grant create(int index) {
152152
.inNamespace(namespace)
153153
.withName(name)
154154
.waitUntilCondition(
155-
grant -> grant.getStatus() != null,
155+
grant -> grant != null && grant.getStatus() != null,
156156
5,
157157
TimeUnit.SECONDS
158158
);

operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator/RoleCreate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected Role create(int index) {
120120
.inNamespace(namespace)
121121
.withName(name)
122122
.waitUntilCondition(
123-
role -> role.getStatus() != null,
123+
role -> role != null && role.getStatus() != null,
124124
5,
125125
TimeUnit.SECONDS
126126
);

operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator/SchemaCreate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected Schema create(int index) {
9494
.inNamespace(namespace)
9595
.withName(name)
9696
.waitUntilCondition(
97-
db -> db.getStatus() != null,
97+
db -> db != null && db.getStatus() != null,
9898
5,
9999
TimeUnit.SECONDS
100100
);

0 commit comments

Comments
 (0)