use of com.hazelcast.jet.core.test.TestInbox in project hazelcast-jet by hazelcast.
the class PeekingWrapperTest method assertPeekInput.
private void assertPeekInput() {
peekP.init(mock(Outbox.class), context);
TestInbox inbox = new TestInbox();
inbox.add(0);
peekP.process(0, inbox);
verify(logger).info("Input from ordinal 0: " + format(0));
inbox.add(0);
peekP.process(1, inbox);
verify(logger).info("Input from ordinal 1: " + format(0));
inbox.add(1);
peekP.process(0, inbox);
if (shouldLogFn == null) {
verify(logger).info("Input from ordinal 0: " + format(1));
} else {
verifyZeroInteractions(logger);
}
Watermark wm = new Watermark(1);
peekP.tryProcessWatermark(wm);
verify(logger).info("Input: " + wm);
}
use of com.hazelcast.jet.core.test.TestInbox in project hazelcast-jet by hazelcast.
the class StreamKafkaPTest method saveSnapshot.
private TestInbox saveSnapshot(StreamKafkaP streamKafkaP, TestOutbox outbox) {
TestInbox snapshot = new TestInbox();
assertTrue(streamKafkaP.saveToSnapshot());
outbox.drainSnapshotQueueAndReset(snapshot.queue(), false);
return snapshot;
}
Aggregations