use of org.teiid.runtime.EmbeddedConfiguration in project teiid by teiid.
the class TestSystemPerformance method setup.
@Before
public void setup() throws VirtualDatabaseException, ConnectorManagerException, TranslatorException {
es = new EmbeddedServer();
es.start(new EmbeddedConfiguration());
ModelMetaData mmm = new ModelMetaData();
mmm.setName("test");
mmm.setSchemaSourceType("native");
mmm.addSourceMapping("x", "hc", null);
HardCodedExecutionFactory hardCodedExecutionFactory = new HardCodedExecutionFactory() {
@Override
public void getMetadata(MetadataFactory metadataFactory, Object conn) throws TranslatorException {
String[] colNames = new String[COLS];
for (int i = 0; i < colNames.length; i++) {
colNames[i] = "col" + i;
}
for (int i = 0; i < TABLES; i++) {
Table t = metadataFactory.addTable("x" + i);
for (int j = 0; j < COLS; j++) {
metadataFactory.addColumn(colNames[j], "string", t);
}
}
}
@Override
public boolean isSourceRequiredForMetadata() {
return false;
}
};
es.addTranslator("hc", hardCodedExecutionFactory);
es.deployVDB("test", mmm);
}
Aggregations