Skip to content

Commit 8d6b540

Browse files
committed
speed up the tests (extreme facepalm) 🤦🏻
1 parent 9308661 commit 8d6b540

8 files changed

Lines changed: 6 additions & 15 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test:
1919
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks
2020

2121
test-pg18:
22-
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks -Dquarkus.test.profile=test-pg18
22+
./gradlew --console=colored :operator:clean :operator:test --fail-fast --rerun-tasks -Dquarkus.test.profile=test-pg18
2323

2424
test-pg17:
2525
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks -Dquarkus.test.profile=test-pg17

operator/src/main/java/it/aboutbits/postgresql/crd/database/DatabaseReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public DeleteControl cleanup(
119119
context.getClient().resource(resource).patchStatus();
120120

121121
return DeleteControl.noFinalizerRemoval()
122-
.rescheduleAfter(1, TimeUnit.SECONDS);
122+
.rescheduleAfter(0, TimeUnit.SECONDS);
123123
}
124124

125125
// We do not actually delete the database if the reclaimPolicy is set to RETAIN, we only delete the CR instance

operator/src/main/java/it/aboutbits/postgresql/crd/defaultprivilege/DefaultPrivilegeReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public DeleteControl cleanup(
141141
context.getClient().resource(resource).patchStatus();
142142

143143
return DeleteControl.noFinalizerRemoval()
144-
.rescheduleAfter(1, TimeUnit.SECONDS);
144+
.rescheduleAfter(0, TimeUnit.SECONDS);
145145
}
146146

147147
var clusterRef = spec.getClusterRef();

operator/src/main/java/it/aboutbits/postgresql/crd/grant/GrantReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public DeleteControl cleanup(
146146
context.getClient().resource(resource).patchStatus();
147147

148148
return DeleteControl.noFinalizerRemoval()
149-
.rescheduleAfter(1, TimeUnit.SECONDS);
149+
.rescheduleAfter(0, TimeUnit.SECONDS);
150150
}
151151

152152
var clusterRef = spec.getClusterRef();

operator/src/main/java/it/aboutbits/postgresql/crd/role/RoleReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public DeleteControl cleanup(
149149
context.getClient().resource(resource).patchStatus();
150150

151151
return DeleteControl.noFinalizerRemoval()
152-
.rescheduleAfter(1, TimeUnit.SECONDS);
152+
.rescheduleAfter(0, TimeUnit.SECONDS);
153153
}
154154

155155
var clusterRef = spec.getClusterRef();

operator/src/main/java/it/aboutbits/postgresql/crd/schema/SchemaReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public DeleteControl cleanup(
121121
context.getClient().resource(resource).patchStatus();
122122

123123
return DeleteControl.noFinalizerRemoval()
124-
.rescheduleAfter(1, TimeUnit.SECONDS);
124+
.rescheduleAfter(0, TimeUnit.SECONDS);
125125
}
126126

127127
// We do not actually delete the schema if the reclaimPolicy is set to RETAIN, we only delete the CR instance

operator/src/test/java/it/aboutbits/postgresql/crd/defaultprivilege/DefaultPrivilegeReconcilerTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import lombok.RequiredArgsConstructor;
1515
import org.jspecify.annotations.NullMarked;
1616
import org.junit.jupiter.api.BeforeEach;
17-
import org.junit.jupiter.api.Disabled;
1817
import org.junit.jupiter.api.DisplayName;
1918
import org.junit.jupiter.api.Nested;
2019
import org.junit.jupiter.api.Test;
@@ -62,7 +61,6 @@ void resetEnvironment() {
6261
class CRDValidation {
6362
@Nested
6463
class FieldSize {
65-
@Disabled("Test is way too slow with all combinations")
6664
@ParameterizedTest
6765
@BlankSource
6866
@DisplayName("Should fail when the database is a blank or empty String (CEL rule)")
@@ -81,7 +79,6 @@ void failWhenDatabaseIsBlankOrEmptyString(
8179
).withMessageContaining("The DefaultPrivilege database must not be empty.");
8280
}
8381

84-
@Disabled("Test is way too slow with all combinations")
8582
@ParameterizedTest
8683
@BlankSource
8784
@DisplayName("Should fail when the role is a blank or empty String (CEL rule)")
@@ -100,7 +97,6 @@ void failWhenRoleIsBlankOrEmptyString(
10097
).withMessageContaining("The DefaultPrivilege role must not be empty.");
10198
}
10299

103-
@Disabled("Test is way too slow with all combinations")
104100
@ParameterizedTest
105101
@BlankSource
106102
@DisplayName("Should fail when the owner is a blank or empty String (CEL rule)")
@@ -119,7 +115,6 @@ void failWhenOwnerIsBlankOrEmptyString(
119115
).withMessageContaining("The DefaultPrivilege owner must not be empty.");
120116
}
121117

122-
@Disabled("Test is way too slow with all combinations")
123118
@ParameterizedTest
124119
@BlankSource
125120
@DisplayName("Should fail when the schema is a blank or empty String (CEL rule)")

operator/src/test/java/it/aboutbits/postgresql/crd/grant/GrantReconcilerTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.jooq.impl.SQLDataType;
1616
import org.jspecify.annotations.NullMarked;
1717
import org.junit.jupiter.api.BeforeEach;
18-
import org.junit.jupiter.api.Disabled;
1918
import org.junit.jupiter.api.DisplayName;
2019
import org.junit.jupiter.api.Nested;
2120
import org.junit.jupiter.api.Test;
@@ -67,7 +66,6 @@ void resetEnvironment() {
6766
class CRDValidation {
6867
@Nested
6968
class FieldSize {
70-
@Disabled("Test is way too slow with all combinations")
7169
@ParameterizedTest
7270
@BlankSource
7371
@DisplayName("Should fail when the database is a blank or empty String (CEL rule)")
@@ -86,7 +84,6 @@ void failWhenDatabaseIsBlankOrEmptyString(
8684
).withMessageContaining("The Grant database must not be empty.");
8785
}
8886

89-
@Disabled("Test is way too slow with all combinations")
9087
@ParameterizedTest
9188
@BlankSource
9289
@DisplayName("Should fail when the role is a blank or empty String (CEL rule)")
@@ -105,7 +102,6 @@ void failWhenRoleIsBlankOrEmptyString(
105102
).withMessageContaining("The Grant role must not be empty.");
106103
}
107104

108-
@Disabled("Test is way too slow with all combinations")
109105
@ParameterizedTest
110106
@BlankSource
111107
@DisplayName("Should fail when the schema is a blank or empty String (CEL rule)")

0 commit comments

Comments
 (0)