use of org.teiid.translator.loopback.LoopbackExecutionFactory in project teiid by teiid.
the class TestODataIntegration method before.
@Before
public void before() throws Exception {
TimestampWithTimezone.resetCalendar(TimeZone.getTimeZone("UTC"));
teiid = new EmbeddedServer();
EmbeddedConfiguration config = new EmbeddedConfiguration();
config.setTransactionManager(new DummyBaseTransactionManager());
teiid.start(config);
ef = new LoopbackExecutionFactory() {
@Override
public boolean supportsRowOffset() {
return false;
}
};
teiid.addTranslator("loopback", ef);
createContext("/odata4", null);
deployVDB();
}
use of org.teiid.translator.loopback.LoopbackExecutionFactory in project teiid by teiid.
the class TestASTQueries method setUp.
@BeforeClass
public static void setUp() throws Exception {
server = new EmbeddedServer();
server.start(new EmbeddedConfiguration());
LoopbackExecutionFactory loopy = new LoopbackExecutionFactory();
loopy.setRowCount(10);
loopy.start();
server.addTranslator("l", loopy);
String DDL = "CREATE FOREIGN TABLE G1 (e1 string, e2 integer);";
ModelMetaData model = new ModelMetaData();
model.setName("PM1");
model.setModelType(Model.Type.PHYSICAL);
model.setSchemaSourceType("DDL");
model.setSchemaText(DDL);
SourceMappingMetadata sm = new SourceMappingMetadata();
sm.setName("loopy");
sm.setTranslatorName("l");
model.addSourceMapping(sm);
server.deployVDB("test", model);
}
use of org.teiid.translator.loopback.LoopbackExecutionFactory in project teiid by teiid.
the class TestLoobackAsynch method test.
public void test() throws Exception {
LoopbackExecutionFactory connector = new LoopbackExecutionFactory();
connector.setWaitTime(200);
connector.setRowCount(1000);
connector.setPollIntervalInMilli(100L);
ConnectorHost host = new ConnectorHost(connector, null, FakeTranslationFactory.getInstance().getBQTTranslationUtility());
// $NON-NLS-1$
List results = host.executeCommand("SELECT intkey from bqt1.smalla");
assertEquals(1000, results.size());
}
Aggregations