QueryMetadataInterface metadata = FakeMetadataFactory.exampleBQTCached();
DQPWorkContext workContext = FakeMetadataFactory.buildWorkContext(metadata, FakeMetadataFactory.exampleBQTVDB());
rm = new DQPCore();
rm.setTransactionService(new FakeTransactionService());
rm.setBufferService(new FakeBufferService());
rm.setCacheFactory(new DefaultCacheFactory());
rm.start(new DQPConfiguration());
FakeBufferService bs = new FakeBufferService();
ConnectorManagerRepository repo = Mockito.mock(ConnectorManagerRepository.class);
Mockito.stub(repo.getConnectorManager(Mockito.anyString())).toReturn(connectorManager);
dtm = new DataTierManagerImpl(rm,
bs, true);
command = helpGetCommand(sql, metadata);
RequestMessage original = new RequestMessage();
original.setExecutionId(1);
original.setPartialResults(true);
RequestID requestID = workContext.getRequestID(original.getExecutionId());
context = new CommandContext();
context.setProcessorID(requestID);
context.setVdbName("test"); //$NON-NLS-1$
context.setVdbVersion(1);
context.setQueryProcessorFactory(new QueryProcessorFactoryImpl(bs.getBufferManager(), dtm, new DefaultCapabilitiesFinder(), null, metadata));
workItem = TestDQPCoreRequestHandling.addRequest(rm, original, requestID, null, workContext);
request = new AtomicRequestMessage(original, workContext, nodeId);
request.setCommand(command);
request.setConnectorName("FakeConnectorID"); //$NON-NLS-1$