use of org.teiid.jdbc.FakeServer 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);
}
use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestODBCProceduresSchema method oneTimeSetup.
@BeforeClass
public static void oneTimeSetup() throws Exception {
server = new FakeServer(true);
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/bqt.vdb");
}
use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestPartsDatabaseMetadata method setUp.
@BeforeClass
public static void setUp() throws Exception {
server = new FakeServer(true);
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
// $NON-NLS-1$ //$NON-NLS-2$
connection = server.createConnection("jdbc:teiid:" + VDB);
dbMetadata = connection.getMetaData();
}
Aggregations