File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit
operator-framework/src/test/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 4
4
import java .time .Duration ;
5
5
import java .util .ArrayList ;
6
6
import java .util .List ;
7
- import java .util .concurrent .TimeUnit ;
8
7
import java .util .function .Consumer ;
9
8
import java .util .stream .Collectors ;
10
9
import java .util .stream .Stream ;
@@ -100,8 +99,11 @@ protected void before(ExtensionContext context) {
100
99
try (InputStream is = getClass ().getResourceAsStream (path )) {
101
100
final var crd = kubernetesClient .load (is );
102
101
crd .createOrReplace ();
103
- crd . waitUntilReady ( 2 , TimeUnit . SECONDS );
102
+ Thread . sleep ( 2000 ); // readiness is not applicable for CRD, just wait a little
104
103
LOGGER .debug ("Applied CRD with name: {}" , config .getResourceTypeName ());
104
+ } catch (InterruptedException ex ) {
105
+ LOGGER .error ("Interrupted." , ex );
106
+ Thread .currentThread ().interrupt ();
105
107
} catch (Exception ex ) {
106
108
throw new IllegalStateException ("Cannot apply CRD yaml: " + path , ex );
107
109
}
Original file line number Diff line number Diff line change 2
2
3
3
import java .util .concurrent .atomic .AtomicInteger ;
4
4
5
- import io .javaoperatorsdk .operator .ReconcilerUtils ;
6
5
import io .javaoperatorsdk .operator .api .reconciler .*;
7
6
import io .javaoperatorsdk .operator .api .reconciler .ControllerConfiguration ;
8
7
import io .javaoperatorsdk .operator .support .TestExecutionInfoProvider ;
@@ -12,8 +11,6 @@ public class EventSourceTestCustomReconciler
12
11
implements Reconciler <EventSourceTestCustomResource >,
13
12
TestExecutionInfoProvider {
14
13
15
- public static final String FINALIZER_NAME =
16
- ReconcilerUtils .getDefaultFinalizerName (EventSourceTestCustomResource .class );
17
14
public static final int TIMER_PERIOD = 500 ;
18
15
private final AtomicInteger numberOfExecutions = new AtomicInteger (0 );
19
16
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ public class TestUtils {
12
12
13
13
public static final String TEST_CUSTOM_RESOURCE_PREFIX = "test-custom-resource-" ;
14
14
public static final String TEST_CUSTOM_RESOURCE_NAME = "test-custom-resource" ;
15
- public static final String TEST_NAMESPACE = "java-operator-sdk-int-test" ;
16
15
17
16
public static TestCustomResource testCustomResource () {
18
17
return testCustomResource (UUID .randomUUID ().toString ());
You can’t perform that action at this time.
0 commit comments