File tree 1 file changed +4
-3
lines changed
operator-framework/src/test/java/io/javaoperatorsdk/operator
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 9
9
import org .junit .jupiter .api .BeforeEach ;
10
10
import org .junit .jupiter .api .Test ;
11
11
import org .junit .jupiter .api .TestInstance ;
12
+ import org .slf4j .Logger ;
13
+ import org .slf4j .LoggerFactory ;
12
14
13
15
import static io .javaoperatorsdk .operator .IntegrationTestSupport .TEST_NAMESPACE ;
14
16
import static io .javaoperatorsdk .operator .sample .event .EventSourceTestCustomResourceController .*;
15
17
import static org .assertj .core .api .Assertions .assertThat ;
16
18
17
19
@ TestInstance (TestInstance .Lifecycle .PER_CLASS )
18
20
public class EventSourceIT {
21
+ private static final Logger log = LoggerFactory .getLogger (EventSourceIT .class );
19
22
20
23
public static final int EXPECTED_TIMER_EVENT_COUNT = 3 ;
21
24
private IntegrationTestSupport integrationTestSupport = new IntegrationTestSupport ();
@@ -34,9 +37,7 @@ public void receivingPeriodicEvents() {
34
37
EventSourceTestCustomResource resource = createTestCustomResource ("1" );
35
38
integrationTestSupport .getCrOperations ().inNamespace (TEST_NAMESPACE ).create (resource );
36
39
37
- Thread .sleep (TIMER_DELAY + EXPECTED_TIMER_EVENT_COUNT * TIMER_PERIOD );
38
-
39
- assertThat (integrationTestSupport .numberOfControllerExecutions ()).isEqualTo (EXPECTED_TIMER_EVENT_COUNT + 1 );
40
+ assertThat (integrationTestSupport .numberOfControllerExecutions ()).isGreaterThanOrEqualTo (EXPECTED_TIMER_EVENT_COUNT + 1 );
40
41
});
41
42
}
42
43
You can’t perform that action at this time.
0 commit comments