10
10
import static org .mockito .Mockito .verify ;
11
11
import static org .mockito .Mockito .when ;
12
12
13
- import io .fabric8 .kubernetes .client .Watcher ;
13
+ import java .util .Objects ;
14
+ import java .util .UUID ;
15
+
16
+ import org .junit .jupiter .api .BeforeEach ;
17
+ import org .junit .jupiter .api .Test ;
18
+ import org .mockito .ArgumentCaptor ;
19
+
14
20
import io .javaoperatorsdk .operator .Metrics ;
15
21
import io .javaoperatorsdk .operator .api .config .ConfigurationService ;
16
22
import io .javaoperatorsdk .operator .api .config .ControllerConfiguration ;
17
23
import io .javaoperatorsdk .operator .processing .event .DefaultEvent ;
18
24
import io .javaoperatorsdk .operator .processing .event .DefaultEventSourceManager ;
19
- import io .javaoperatorsdk .operator .processing .event .internal .CustomResourceEvent ;
20
- import io .javaoperatorsdk .operator .processing .event .internal .TimerEventSource ;
21
25
import io .javaoperatorsdk .operator .sample .simple .TestCustomResource ;
22
- import java .util .Objects ;
23
- import java .util .UUID ;
24
- import org .junit .jupiter .api .BeforeEach ;
25
- import org .junit .jupiter .api .Test ;
26
- import org .mockito .ArgumentCaptor ;
27
26
28
27
class CustomResourceSelectorTest {
29
28
30
- public static final int FAKE_CONTROLLER_EXECUTION_DURATION = 250 ;
31
29
public static final int SEPARATE_EXECUTION_TIMEOUT = 450 ;
32
30
33
31
private final EventDispatcher eventDispatcherMock = mock (EventDispatcher .class );
@@ -36,7 +34,6 @@ class CustomResourceSelectorTest {
36
34
private final DefaultEventSourceManager defaultEventSourceManagerMock =
37
35
mock (DefaultEventSourceManager .class );
38
36
39
- private TimerEventSource retryTimerEventSourceMock = mock (TimerEventSource .class );
40
37
private ControllerConfiguration configuration =
41
38
mock (ControllerConfiguration .class );
42
39
private final ConfigurationService configService = mock (ConfigurationService .class );
@@ -125,13 +122,4 @@ private void waitMinimalTime() {
125
122
}
126
123
}
127
124
128
- private CustomResourceEvent prepareCREvent () {
129
- return prepareCREvent (UUID .randomUUID ().toString ());
130
- }
131
-
132
- private CustomResourceEvent prepareCREvent (String uid ) {
133
- TestCustomResource customResource = testCustomResource (uid );
134
- customResourceCache .cacheResource (customResource );
135
- return new CustomResourceEvent (Watcher .Action .MODIFIED , customResource , null );
136
- }
137
125
}
0 commit comments