use of org.vitrivr.cineast.core.db.dao.writer.MediaObjectMetadataWriter in project cineast by vitrivr.
the class MetadataTest method setupTest.
@BeforeEach
void setupTest() {
/* Open all readers. */
this.objSelector = this.provider.getSelector();
this.segSelector = this.provider.getSelector();
this.objReader = new MediaObjectMetadataReader(this.objSelector, this.testObjMetaTableName);
this.segReader = new MediaSegmentMetadataReader(this.segSelector, this.testSegMetaTableName);
/* Test database connection. */
LOGGER.info("Trying to establish connection to Database");
if (!objSelector.ping()) {
LOGGER.error("Connection to DB could not be established, failing test using assumeTrue()");
}
assumeTrue(objSelector.ping(), "Connection to database could not be established");
LOGGER.info("Connection to Database established");
/* Open all writers. */
this.ec = provider.getEntityCreator();
this.objPersWriter = provider.getPersistencyWriter();
this.segPersWriter = provider.getPersistencyWriter();
this.objWriter = new MediaObjectMetadataWriter(objPersWriter, testObjMetaTableName);
this.segWriter = new MediaSegmentMetadataWriter(segPersWriter, testSegMetaTableName);
/* Prepare databases. */
dropTables();
createTables();
fillMetadata();
finishSetup();
}
Aggregations