Skip to content

Commit b770d4d

Browse files
authored
fix: test tuned periods (#1196)
1 parent 2bbc51d commit b770d4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/event/source/polling/PerResourcePollingEventSourceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
class PerResourcePollingEventSourceTest extends
2929
AbstractEventSourceTestBase<PerResourcePollingEventSource<SampleExternalResource, TestCustomResource>, EventHandler> {
3030

31-
public static final int PERIOD = 80;
31+
public static final int PERIOD = 150;
3232
private PerResourcePollingEventSource.ResourceFetcher<SampleExternalResource, TestCustomResource> supplier =
3333
mock(PerResourcePollingEventSource.ResourceFetcher.class);
3434
private Cache<TestCustomResource> resourceCache = mock(Cache.class);
@@ -116,11 +116,11 @@ void getsValueFromCacheOrSupplier() throws InterruptedException {
116116
.thenReturn(Collections.emptySet())
117117
.thenReturn(Set.of(SampleExternalResource.testResource1()));
118118

119-
Thread.sleep(PERIOD / 2);
119+
Thread.sleep(PERIOD / 3);
120120

121121
var value = source.getSecondaryResources(testCustomResource);
122122
verify(eventHandler, times(0)).handleEvent(any());
123-
assertThat(value).hasSize(0);
123+
assertThat(value).isEmpty();
124124

125125
Thread.sleep(PERIOD * 2);
126126

0 commit comments

Comments
 (0)