File tree 1 file changed +17
-0
lines changed
operator-framework/src/test/java/io/javaoperatorsdk/operator
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 12
12
import org .junit .jupiter .api .Test ;
13
13
import org .junit .jupiter .api .TestInstance ;
14
14
15
+ import java .util .Collections ;
15
16
import java .util .concurrent .TimeUnit ;
16
17
17
18
import static io .javaoperatorsdk .operator .IntegrationTestSupport .TEST_NAMESPACE ;
@@ -45,6 +46,22 @@ public void updatesSubResourceStatus() {
45
46
});
46
47
}
47
48
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
+
48
65
/**
49
66
* Note that we check on controller impl if there is finalizer on execution.
50
67
*/
You can’t perform that action at this time.
0 commit comments