File tree 1 file changed +3
-6
lines changed
operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,9 @@ protected void before(ExtensionContext context) {
169
169
}
170
170
171
171
try (InputStream is = getClass ().getResourceAsStream (path )) {
172
- kubernetesClient .load (is ).createOrReplace ();
173
- // this fixes an issue with CRD registration, integration tests were failing, since the CRD
174
- // was not found yet
175
- // when the operator started. This seems to be fixing this issue (maybe a problem with
176
- // minikube?)
177
- Thread .sleep (2000 );
172
+ final var crd = kubernetesClient .load (is );
173
+ crd .createOrReplace ();
174
+ crd .waitUntilReady (2 , TimeUnit .SECONDS );
178
175
LOGGER .debug ("Applied CRD with name: {}" , config .getResourceTypeName ());
179
176
} catch (Exception ex ) {
180
177
throw new IllegalStateException ("Cannot apply CRD yaml: " + path , ex );
You can’t perform that action at this time.
0 commit comments