Search in sources :

Example 1 with LoopInstruction

use of org.teiid.query.processor.proc.LoopInstruction in project teiid by teiid.

the class TestProcedurePlanner method testLoopInstructionTransaction.

@Test
public void testLoopInstructionTransaction() throws Exception {
    // create a dummy instruction that may need a transaction to create the loop
    LoopInstruction loop = new LoopInstruction(new Program(false) {

        @Override
        public Boolean requiresTransaction(boolean transactionalReads) {
            return null;
        }
    }, "x", new RelationalPlan(new RelationalNode(1) {

        @Override
        protected TupleBatch nextBatchDirect() throws BlockedException, TeiidComponentException, TeiidProcessingException {
            return null;
        }

        @Override
        public Object clone() {
            return null;
        }
    }), "y");
    assertNull(loop.requiresTransaction(true));
}
Also used : LoopInstruction(org.teiid.query.processor.proc.LoopInstruction) RelationalNode(org.teiid.query.processor.relational.RelationalNode) Program(org.teiid.query.processor.proc.Program) RelationalPlan(org.teiid.query.processor.relational.RelationalPlan) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 LoopInstruction (org.teiid.query.processor.proc.LoopInstruction)1 Program (org.teiid.query.processor.proc.Program)1 RelationalNode (org.teiid.query.processor.relational.RelationalNode)1 RelationalPlan (org.teiid.query.processor.relational.RelationalPlan)1