use of io.prestosql.operator.PartitionedOutputOperator.PartitionedOutputOperatorFactory in project hetu-core by openlookeng.
the class TestPartitionedOutputOperatorFactory method testDuplicate.
@Test
public void testDuplicate() {
OutputBuffer outputBuffer = mock(OutputBuffer.class);
PartitionedOutputOperatorFactory factory1 = new PartitionedOutputOperatorFactory(1, new PlanNodeId("planNodeId"), Collections.emptyList(), a -> a, mock(PartitionFunction.class), Collections.emptyList(), Collections.emptyList(), false, OptionalInt.empty(), outputBuffer, DataSize.succinctBytes(1));
OperatorFactory factory2 = factory1.duplicate();
OperatorFactory factory3 = factory1.duplicate();
OperatorFactory factory4 = factory2.duplicate();
factory1.noMoreOperators();
factory3.noMoreOperators();
factory4.noMoreOperators();
verify(outputBuffer, never()).setNoMoreInputChannels();
factory2.noMoreOperators();
verify(outputBuffer).setNoMoreInputChannels();
}
Aggregations