Skip to content

Commit 91c7cdf

Browse files
committed
test run fix
1 parent 2e85c97 commit 91c7cdf

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public void start() throws OperatorException {
6666
}
6767
try {
6868
var start = informer.start();
69+
// note that in case we don't put here timeout and stopOnInformerErrorDuringStartup is
70+
// false, and there is a rbac issue the get never returns; therefore operator never really
71+
// starts
6972
start.toCompletableFuture().get(configService.cacheSyncTimeout(), TimeUnit.MILLISECONDS);
7073
} catch (TimeoutException | ExecutionException e) {
7174
log.warn("Informer startup error. Informer: {}", informer, e);

operator-framework/src/test/java/io/javaoperatorsdk/operator/InformerRelatedBehaviorTest.java renamed to operator-framework/src/test/java/io/javaoperatorsdk/operator/InformerRelatedBehaviorITS.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@
3131
* that with periodical watch reconnect the permission is tested again.
3232
* </p>
3333
* <p>
34-
* The test does not end with "IT" since that did not work with tags.
34+
* The test ends with "ITS" (Special) since it needs to run separately from other ITs
3535
* </p>
3636
*/
37-
@Tag("WatchPermissionAwareTest")
38-
class InformerRelatedBehaviorTest {
37+
class InformerRelatedBehaviorITS {
3938

4039
public static final String TEST_RESOURCE_NAME = "test1";
4140

pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@
373373
<exclude>**/*Test.java</exclude>
374374
<exclude>**/*E2E.java</exclude>
375375
</excludes>
376-
<excludedGroups>WatchPermissionAwareTest</excludedGroups>
377376
</configuration>
378377
</plugin>
379378
</plugins>
@@ -388,7 +387,14 @@
388387
<groupId>org.apache.maven.plugins</groupId>
389388
<artifactId>maven-surefire-plugin</artifactId>
390389
<configuration>
391-
<groups>WatchPermissionAwareTest</groups>
390+
<includes>
391+
<include>**/*ITS.java</include>
392+
</includes>
393+
<excludes>
394+
<exclude>**/*Test.java</exclude>
395+
<exclude>**/*E2E.java</exclude>
396+
<exclude>**/*IT.java</exclude>
397+
</excludes>
392398
</configuration>
393399
</plugin>
394400
</plugins>
@@ -418,14 +424,14 @@
418424
<id>release</id>
419425
<build>
420426
<plugins>
421-
422427
<plugin>
423428
<groupId>org.apache.maven.plugins</groupId>
424429
<artifactId>maven-surefire-plugin</artifactId>
425430
<configuration>
426431
<excludes>
427432
<exclude>**/*IT.java</exclude>
428433
<exclude>**/*E2E.java</exclude>
434+
<exclude>**/InformerRelatedBehaviorTest.java</exclude>
429435
</excludes>
430436
</configuration>
431437
</plugin>

0 commit comments

Comments
 (0)