use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestGeometryTransform method setup.
@BeforeClass
public static void setup() throws Exception {
server = new FakeServer(true);
// $NON-NLS-1$
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
}
use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestMatViewAliasing method setUp.
@Before
public void setUp() throws Exception {
server = new FakeServer(true);
VDBRepository vdbRepository = new VDBRepository();
MetadataFactory mf = new MetadataFactory(null, 1, "foo", vdbRepository.getRuntimeTypeMap(), new Properties(), null);
mf.getSchema().setPhysical(false);
Table mat = mf.addTable("mat");
mat.setVirtual(true);
mat.setMaterialized(true);
mat.setSelectTransformation("/*+ cache(ttl:0) */ select 1 as x, 'y' as Name");
mf.addColumn("x", DataTypeManager.DefaultDataTypes.INTEGER, mat);
mf.addColumn("Name", DataTypeManager.DefaultDataTypes.STRING, mat);
MetadataStore ms = mf.asMetadataStore();
server.deployVDB(MATVIEWS, ms);
conn = server.createConnection("jdbc:teiid:" + MATVIEWS);
}
use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestMatViews method setUp.
@Before
public void setUp() throws Exception {
server = new FakeServer(true);
HashMap<String, Collection<FunctionMethod>> udfs = new HashMap<String, Collection<FunctionMethod>>();
udfs.put("funcs", Arrays.asList(new FunctionMethod("pause", null, null, PushDown.CANNOT_PUSHDOWN, TestMatViews.class.getName(), "pause", null, new FunctionParameter("return", DataTypeManager.DefaultDataTypes.INTEGER), true, Determinism.NONDETERMINISTIC)));
server.deployVDB(MATVIEWS, UnitTestUtil.getTestDataPath() + "/matviews.vdb", new DeployVDBParameter(udfs, null));
conn = server.createConnection("jdbc:teiid:matviews");
}
use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestODBCSchema method oneTimeSetUp.
@BeforeClass
public static void oneTimeSetUp() throws Exception {
server = new FakeServer(true);
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
}
use of org.teiid.jdbc.FakeServer in project teiid by teiid.
the class TestReplication method createServer.
private FakeServer createServer(String ispn, String jgroups) throws Exception {
FakeServer server = new FakeServer(false);
EmbeddedConfiguration config = new EmbeddedConfiguration();
config.setInfinispanConfigFile(ispn);
config.setJgroupsConfigFile(jgroups);
config.setTransactionManager(new DummyTransactionManager());
server.start(config, true);
return server;
}
Aggregations