use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestSystemVirtualModel method setup.
@BeforeClass
public static void setup() throws Exception {
server = new FakeServer(true);
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
ModelMetaData mmd = new ModelMetaData();
mmd.setName("x");
mmd.setModelType(Type.VIRTUAL);
mmd.addSourceMetadata("DDL", "create view t as select 1");
ModelMetaData mmd1 = new ModelMetaData();
mmd1.setName("y");
mmd1.setModelType(Type.VIRTUAL);
mmd1.addSourceMetadata("DDL", "create view T as select 1");
server.deployVDB("test", mmd, mmd1);
ModelMetaData mmd2 = new ModelMetaData();
mmd2.setName("x");
mmd2.setModelType(Type.VIRTUAL);
mmd2.addSourceMetadata("DDL", "create view t (g geometry options (\"teiid_spatial:srid\" 3819)) as select null;");
server.deployVDB("test1", mmd2);
}
use of org.teiid.jdbc.FakeServer 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.jdbc.FakeServer in project teiid by teiid.
the class TestVirtualDocWithVirtualProc method oneTimeSetup.
@BeforeClass
public static void oneTimeSetup() throws Exception {
server = new FakeServer(true);
// this vdb has invalid update procedures
server.setThrowMetadataErrors(false);
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/xml-vp/xmlvp_1.vdb");
}
use of org.teiid.jdbc.FakeServer 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.jdbc.FakeServer 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();
}
Aggregations