@Test public void testContinuation() throws Exception { OnceTrigger trigger1 = AfterProcessingTime.pastFirstElementInPane(); OnceTrigger trigger2 = AfterWatermark.pastEndOfWindow(); Trigger afterAll = AfterAll.of(trigger1, trigger2); assertEquals( AfterAll.of(trigger1.getContinuationTrigger(), trigger2.getContinuationTrigger()), afterAll.getContinuationTrigger()); }
@Test public void testToString() { Trigger trigger = AfterAll.of(StubTrigger.named("t1"), StubTrigger.named("t2")); assertEquals("AfterAll.of(t1, t2)", trigger.toString()); } }
@Test public void testFireDeadline() throws Exception { BoundedWindow window = new IntervalWindow(new Instant(0), new Instant(10)); assertEquals( BoundedWindow.TIMESTAMP_MAX_VALUE, AfterAll.of(AfterWatermark.pastEndOfWindow(), AfterPane.elementCountAtLeast(1)) .getWatermarkThatGuaranteesFiring(window)); }
public static Trigger fromProto(RunnerApi.Trigger triggerProto) { switch (triggerProto.getTriggerCase()) { case AFTER_ALL: return AfterAll.of(protosToTriggers(triggerProto.getAfterAll().getSubtriggersList())); case AFTER_ANY: return AfterFirst.of(protosToTriggers(triggerProto.getAfterAny().getSubtriggersList()));
AfterAll.of(AfterPane.elementCountAtLeast(79), AfterWatermark.pastEndOfWindow())), toProtoAndBackSpec( AfterEach.inOrder(AfterPane.elementCountAtLeast(79), AfterPane.elementCountAtLeast(3))),