addPage(sharedBuffer, createPage(i));
}
sharedBuffer.finish();
outputBuffers = outputBuffers.withBuffer("first", new UnpartitionedPagePartitionFunction());
sharedBuffer.setOutputBuffers(outputBuffers);
assertBufferResultEquals(sharedBuffer.get("first", 0, sizeOfPages(1), NO_WAIT), bufferResult(0, createPage(0)));
sharedBuffer.abort("first");
assertQueueClosed(sharedBuffer, "first", 0);
assertBufferResultEquals(sharedBuffer.get("first", 1, sizeOfPages(1), NO_WAIT), emptyResults(1, true));
outputBuffers = outputBuffers.withBuffer("second", new UnpartitionedPagePartitionFunction()).withNoMoreBufferIds();
sharedBuffer.setOutputBuffers(outputBuffers);
assertBufferResultEquals(sharedBuffer.get("second", 0, sizeOfPages(1), NO_WAIT), bufferResult(0, createPage(0)));
sharedBuffer.abort("second");
assertQueueClosed(sharedBuffer, "second", 0);
assertFinished(sharedBuffer);