use of io.crate.operation.PageResultListener in project crate by crate.
the class PageDownstreamContextTest method testListenersCalledWhenOtherUpstreamIsFailing.
@Test
public void testListenersCalledWhenOtherUpstreamIsFailing() throws Exception {
TestingBatchConsumer consumer = new TestingBatchConsumer();
PageDownstreamContext ctx = getPageDownstreamContext(consumer, PassThroughPagingIterator.oneShot(), 2);
PageResultListener listener = mock(PageResultListener.class);
ctx.setBucket(0, Bucket.EMPTY, true, listener);
ctx.failure(1, new Exception("dummy"));
verify(listener, times(1)).needMore(false);
}
Aggregations