use of cz.o2.proxima.time.WatermarkIdlePolicy in project proxima-platform by O2-Czech-Republic.
the class BoundedOutOfOrdernessWatermarkEstimatorTest method testIdlePolicy.
@Test
public void testIdlePolicy() {
WatermarkIdlePolicy idlePolicy = mock(WatermarkIdlePolicy.class);
BoundedOutOfOrdernessWatermarkEstimator estimator = BoundedOutOfOrdernessWatermarkEstimator.newBuilder().withWatermarkIdlePolicy(idlePolicy).build();
StreamElement element = element(now);
estimator.update(element);
verify(idlePolicy, times(1)).update(element);
estimator.idle();
verify(idlePolicy, times(1)).idle(now);
}
use of cz.o2.proxima.time.WatermarkIdlePolicy in project proxima-platform by O2-Czech-Republic.
the class NotProgressingWatermarkIdlePolicyTest method testFactory.
@Test
public void testFactory() {
WatermarkIdlePolicyFactory factory = new NotProgressingWatermarkIdlePolicy.Factory();
WatermarkIdlePolicy policy = factory.create(Collections.emptyMap());
assertNotNull(policy);
assertEquals(NotProgressingWatermarkIdlePolicy.class, policy.getClass());
}
Aggregations