Package org.teiid.dqp.internal.datamgr

Examples of org.teiid.dqp.internal.datamgr.FakeTransactionService


        PreparedStatementRequest serverRequest = new PreparedStatementRequest(prepPlanCache);
       
        ConnectorManagerRepository repo = Mockito.mock(ConnectorManagerRepository.class);
        Mockito.stub(repo.getConnectorManager(Mockito.anyString())).toReturn(new AutoGenDataService());
       
        serverRequest.initialize(request, BufferManagerFactory.getStandaloneBufferManager(), null, new FakeTransactionService(), null, workContext, prepPlanCache);
        serverRequest.setMetadata(capFinder, metadata, null);
        serverRequest.setAuthorizationValidator(new DataRoleAuthorizationValidator(false, true, true));
        serverRequest.processRequest();
       
        assertNotNull(serverRequest.processPlan);
View Full Code Here


        QueryResolver.resolveCommand(command, metadata);
       
        // Create components
        SessionAwareCache<PreparedPlan> prepPlanCache = new SessionAwareCache<PreparedPlan>();
        DQPCore requestMgr = new DQPCore();
        requestMgr.setTransactionService(new FakeTransactionService());

        DQPWorkContext workContext = FakeMetadataFactory.buildWorkContext(metadata, vdb);

        // Initialize components
        RequestID requestID = workContext.getRequestID(1)
View Full Code Here

    /**
     * Test for Collection getRequests(SessionToken) - 1 request
     */
    public void testGetRequestsSessionToken2() {
      DQPCore rm = new DQPCore();
      rm.setTransactionService(new FakeTransactionService());
      Set<RequestID> reqs = new HashSet<RequestID>();
        RequestID id = addRequest(rm, SESSION_STRING, 1);
        reqs.add(id);

        Collection<RequestMetadata> actualReqs = rm.getRequestsForSession(SESSION_STRING);
View Full Code Here

    /**
     * Test for Collection getRequests(SessionToken) - 3 requests
     */
    public void testGetRequestsSessionToken3() {
        DQPCore rm = new DQPCore();
        rm.setTransactionService(new FakeTransactionService());
        Set<RequestID> reqs = new HashSet<RequestID>();
        
        reqs.add(addRequest(rm, SESSION_STRING, 0));
        reqs.add(addRequest(rm, SESSION_STRING, 1));
        reqs.add(addRequest(rm, SESSION_STRING, 2));
View Full Code Here

      return new SourceWarning(model, binding, new TeiidException(message), true);
    }
       
    public void testAddRequest() {
        DQPCore rm = new DQPCore();
        rm.setTransactionService(new FakeTransactionService());
        RequestMessage r0 = new RequestMessage("foo"); //$NON-NLS-1$
        RequestID requestID = new RequestID(SESSION_STRING, 1);
        addRequest(rm, r0, requestID, null, null)
    }
View Full Code Here

        addRequest(rm, r0, requestID, null, null)
    }
   
    public void testWarnings1() {
        DQPCore rm = new DQPCore();
        rm.setTransactionService(new FakeTransactionService());
        RequestMessage r0 = new RequestMessage("foo"); //$NON-NLS-1$
        RequestID requestID = new RequestID(SESSION_STRING, 1);

        RequestWorkItem workItem = addRequest(rm, r0, requestID, null, null);
               
View Full Code Here

        return workItem;
    }
   
    public void testGetConnectorInfo() {
        DQPCore rm = new DQPCore();
        rm.setTransactionService(new FakeTransactionService());
        RequestMessage r0 = new RequestMessage("foo"); //$NON-NLS-1$
        RequestID requestID = new RequestID(SESSION_STRING, 1);
        RequestWorkItem workItem = addRequest(rm, r0, requestID, null, null);
        AtomicRequestMessage atomicReq = new AtomicRequestMessage(workItem.requestMsg, workItem.getDqpWorkContext(), 1);
View Full Code Here

        assertTrue(arInfo == info);
    }
   
    public void testRemoveConnectorInfo() {
        DQPCore rm = new DQPCore();
        rm.setTransactionService(new FakeTransactionService());
        RequestMessage r0 = new RequestMessage("foo"); //$NON-NLS-1$
        RequestID requestID = new RequestID(SESSION_STRING, 1);
        RequestWorkItem workItem = addRequest(rm, r0, requestID, null, null);
        AtomicRequestMessage atomicReq = new AtomicRequestMessage(workItem.requestMsg, workItem.getDqpWorkContext(), 1);
View Full Code Here

        QueryResolver.resolveCommand(command, metadata);
       
        RequestMessage message = new RequestMessage();
        DQPWorkContext workContext = FakeMetadataFactory.buildWorkContext(metadata, FakeMetadataFactory.example1VDB());
       
        request.initialize(message, null, null,new FakeTransactionService(), TEMP_TABLE_STORE, workContext, null);
        request.initMetadata();
        request.setAuthorizationValidator(new DataRoleAuthorizationValidator(true, true, true));
        request.validateAccess(command);
    }
View Full Code Here

        ConnectorManagerRepository repo = Mockito.mock(ConnectorManagerRepository.class);
        workContext.getVDB().addAttchment(ConnectorManagerRepository.class, repo);
        Mockito.stub(repo.getConnectorManager(Mockito.anyString())).toReturn(new AutoGenDataService());
       
        request.initialize(message, Mockito.mock(BufferManager.class),
        new FakeDataManager(), new FakeTransactionService(), TEMP_TABLE_STORE, workContext, null);
        request.setAuthorizationValidator(new DataRoleAuthorizationValidator(false, true, true));
        request.processRequest();
        return request;
    }
View Full Code Here

TOP

Related Classes of org.teiid.dqp.internal.datamgr.FakeTransactionService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.