File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
operator-framework/src/test/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1212import org .junit .jupiter .api .Test ;
1313import org .junit .jupiter .api .TestInstance ;
1414
15+ import java .util .Collections ;
1516import java .util .concurrent .TimeUnit ;
1617
1718import static io .javaoperatorsdk .operator .IntegrationTestSupport .TEST_NAMESPACE ;
@@ -45,6 +46,22 @@ public void updatesSubResourceStatus() {
4546 });
4647 }
4748
49+ @ Test
50+ public void updatesSubResourceStatusNoFinalizer () {
51+ integrationTestSupport .teardownIfSuccess (() -> {
52+ SubResourceTestCustomResource resource = createTestCustomResource ("1" );
53+ resource .getMetadata ().setFinalizers (Collections .EMPTY_LIST );
54+
55+ integrationTestSupport .getCrOperations ().inNamespace (TEST_NAMESPACE ).create (resource );
56+
57+ awaitStatusUpdated (resource .getMetadata ().getName ());
58+ // wait for sure, there are no more events
59+ waitXms (200 );
60+ // there is no event on status update processed
61+ assertThat (integrationTestSupport .numberOfControllerExecutions ()).isEqualTo (2 );
62+ });
63+ }
64+
4865 /**
4966 * Note that we check on controller impl if there is finalizer on execution.
5067 */
You can’t perform that action at this time.
0 commit comments