use of org.teiid.runtime.EmbeddedConfiguration in project teiid by teiid.
the class TestExecutionReuse method oneTimeSetUp.
@BeforeClass
public static void oneTimeSetUp() throws Exception {
EmbeddedConfiguration config = new EmbeddedConfiguration();
config.setUserRequestSourceConcurrency(1);
server = new FakeServer(false);
server.setConnectorManagerRepository(new ConnectorManagerRepository() {
private ConnectorManager cm = new ConnectorManager("x", "y") {
private ExecutionFactory<Object, Object> ef = new ExecutionFactory<Object, Object>() {
@Override
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws TranslatorException {
ec = executionContext;
return execution;
}
public boolean isSourceRequired() {
return false;
}
};
@Override
public ExecutionFactory<Object, Object> getExecutionFactory() {
return ef;
}
@Override
public Object getConnectionFactory() throws TranslatorException {
return null;
}
};
@Override
public ConnectorManager getConnectorManager(String connectorName) {
return cm;
}
});
server.start(config, false);
server.deployVDB("PartsSupplier", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
}
use of org.teiid.runtime.EmbeddedConfiguration in project teiid by teiid.
the class TestTempOrdering method setup.
@BeforeClass
public static void setup() throws Exception {
server = new FakeServer(false);
EmbeddedConfiguration ec = new EmbeddedConfiguration();
Properties p = new Properties();
p.setProperty("org.teiid.defaultNullOrder", "HIGH");
ec.setProperties(p);
server.start(ec, false);
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
}
use of org.teiid.runtime.EmbeddedConfiguration in project teiid by teiid.
the class TestJDBCSocketAuthentication method oneTimeSetup.
@BeforeClass
public static void oneTimeSetup() throws Exception {
SocketConfiguration config = new SocketConfiguration();
config.setSSLConfiguration(new SSLConfiguration());
addr = new InetSocketAddress(0);
config.setBindAddress(addr.getHostName());
config.setPortNumber(0);
EmbeddedConfiguration dqpConfig = new EmbeddedConfiguration();
dqpConfig.setMaxActivePlans(2);
dqpConfig.setSecurityHelper(new DoNothingSecurityHelper() {
@Override
public Subject getSubjectInContext(Object context) {
return null;
}
@Override
public Subject getSubjectInContext(String securityDomain) {
return null;
}
});
server = new FakeServer(false);
server.start(dqpConfig, false);
server.deployVDB("parts", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
jdbcTransport = new SocketListener(addr, config, server.getClientServiceRegistry(), BufferManagerFactory.getStandaloneBufferManager()) {
@Override
protected SSLAwareChannelHandler createChannelHandler() {
SSLAwareChannelHandler result = new SSLAwareChannelHandler(this) {
public void messageReceived(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception {
if (delay > 0) {
Thread.sleep(delay);
}
super.messageReceived(ctx, msg);
}
};
return result;
}
};
}
use of org.teiid.runtime.EmbeddedConfiguration in project teiid by teiid.
the class TestJDBCSocketAuthentication method testSetAuthType.
@Test
public void testSetAuthType() throws Exception {
FakeServer es = new FakeServer(false);
EmbeddedConfiguration ec = new EmbeddedConfiguration();
ec.setAuthenticationType(AuthenticationType.GSS);
es.start(ec);
es.deployVDB("parts", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
assertEquals(AuthenticationType.GSS, es.getSessionService().getAuthenticationType("parts", null, "testuser"));
assertEquals(AuthenticationType.GSS, es.getClientServiceRegistry().getAuthenticationType());
es.stop();
}
use of org.teiid.runtime.EmbeddedConfiguration in project teiid by teiid.
the class TestJDBCSocketTransport method oneTimeSetup.
@BeforeClass
public static void oneTimeSetup() throws Exception {
SocketConfiguration config = new SocketConfiguration();
config.setSSLConfiguration(new SSLConfiguration());
addr = new InetSocketAddress(0);
config.setBindAddress(addr.getHostName());
config.setPortNumber(0);
EmbeddedConfiguration dqpConfig = new EmbeddedConfiguration();
dqpConfig.setMaxActivePlans(2);
server = new FakeServer(false);
server.start(dqpConfig, false);
server.deployVDB("parts", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
jdbcTransport = new SocketListener(addr, config, server.getClientServiceRegistry(), BufferManagerFactory.getStandaloneBufferManager()) {
@Override
protected SSLAwareChannelHandler createChannelHandler() {
SSLAwareChannelHandler result = new SSLAwareChannelHandler(this) {
public void messageReceived(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception {
if (delay > 0) {
Thread.sleep(delay);
}
super.messageReceived(ctx, msg);
}
};
return result;
}
};
jdbcTransport.setMaxMessageSize(MAX_MESSAGE);
jdbcTransport.setMaxLobSize(MAX_LOB);
}
Aggregations