use of org.teiid.infinispan.api.HotRodTestServer in project teiid by teiid.
the class TestHotrodExecution method setup.
@BeforeClass
public static void setup() throws Exception {
TimestampWithTimezone.resetCalendar(TimeZone.getTimeZone("GMT-5"));
SERVER = new HotRodTestServer(PORT);
MetadataFactory mf = TestProtobufMetadataProcessor.protoMatadata("tables.proto");
EF = new InfinispanExecutionFactory();
TransformationMetadata tm = TestProtobufMetadataProcessor.getTransformationMetadata(mf, EF);
// String ddl = DDLStringVisitor.getDDLString(mf.getSchema(), null, null);
// System.out.println(ddl);
METADATA = new RuntimeMetadataImpl(tm);
UTILITY = new TranslationUtility(tm);
InfinispanConnection connection = SERVER.getConnection();
// only use G2 & G4 as cache only support single id
connection.registerProtobufFile(new ProtobufResource("tables.proto", ObjectConverterUtil.convertFileToString(UnitTestUtil.getTestDataFile("tables.proto"))));
EC = Mockito.mock(ExecutionContext.class);
Mockito.stub(EC.getBatchSize()).toReturn(512);
}
Aggregations