Search in sources :

Example 1 with AbstractUnaryOutputOperatorNodePushable

use of org.apache.hyracks.dataflow.std.base.AbstractUnaryOutputOperatorNodePushable in project asterixdb by apache.

the class FramewriterTest method testBTreeSearchOperatorNodePushable.

private void testBTreeSearchOperatorNodePushable() throws Exception {
    /*
         * coverage
         * in open(){
         *  writer.open() succeeds vs. throws exception vs. throws error
         *   indexHelper.open() succeeds vs. throws exception
         *    createAccessor() succeeds vs. throws exception
         * }
         * in nextFrame(){
         *  indexAccessor.search succeeds vs. throws exception
         *   writeSearchResults succeeds vs. throws exception vs. throws error
         * }
         * in fail(){
         *  writer.fail() succeeds, throws exception, or throws error
         * }
         * in close(){
         *  appender.close() succeeds, throws exception, or throws error
         * }
         */
    int i = 0;
    counter = 0;
    while (i < NUMBER_OF_APPENDERS) {
        i++;
        ByteBuffer buffer = mockByteBuffer();
        IFrameWriter[] outPutFrameWriters = createOutputWriters();
        for (IFrameWriter outputWriter : outPutFrameWriters) {
            IFrameWriter[] underTest = createWriters();
            for (IFrameWriter writer : underTest) {
                ((AbstractUnaryOutputOperatorNodePushable) writer).setOutputFrameWriter(0, outputWriter, mockRecordDescriptor());
                testWriter(writer, buffer);
            }
        }
        counter = i;
    }
}
Also used : IFrameWriter(org.apache.hyracks.api.comm.IFrameWriter) AbstractUnaryOutputOperatorNodePushable(org.apache.hyracks.dataflow.std.base.AbstractUnaryOutputOperatorNodePushable) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 IFrameWriter (org.apache.hyracks.api.comm.IFrameWriter)1 AbstractUnaryOutputOperatorNodePushable (org.apache.hyracks.dataflow.std.base.AbstractUnaryOutputOperatorNodePushable)1