use of org.testng.annotations.BeforeTest in project incubator-atlas by apache.
the class DefaultMetadataServiceTest method setUp.
@BeforeTest
public void setUp() throws Exception {
typeDefChangeListener = (DefaultMetadataService) metadataService;
metadataService = TestUtils.addSessionCleanupWrapper(metadataService);
if (auditRepository instanceof HBaseBasedAuditRepository) {
HBaseTestUtils.startCluster();
((HBaseBasedAuditRepository) auditRepository).start();
}
TestUtils.resetRequestContext();
RequestContext.get().setUser("testuser");
TypesDef typesDef = TestUtils.defineHiveTypes();
try {
metadataService.getTypeDefinition(TestUtils.TABLE_TYPE);
} catch (TypeNotFoundException e) {
metadataService.createType(TypesSerialization.toJson(typesDef));
}
String dbGUid = TestUtils.createInstance(metadataService, db);
table = createTableEntity(dbGUid);
String tableGuid = TestUtils.createInstance(metadataService, table);
String tableDefinitionJson = metadataService.getEntityDefinition(TestUtils.TABLE_TYPE, NAME, (String) table.get(NAME));
table = InstanceSerialization.fromJsonReferenceable(tableDefinitionJson, true);
tableId = new Id(tableGuid, 0, TestUtils.TABLE_TYPE);
}
use of org.testng.annotations.BeforeTest in project gatk by broadinstitute.
the class ReferenceMemorySourceTest method init.
@BeforeTest
public void init() {
List<SAMSequenceRecord> l = new ArrayList<>();
l.add(new SAMSequenceRecord("chr1", 1000000));
SAMSequenceDictionary seqDir = new SAMSequenceDictionary(l);
memorySource = new ReferenceMemorySource(ref1, seqDir);
}
use of org.testng.annotations.BeforeTest in project jetcd by coreos.
the class LeaseTest method setUp.
@BeforeTest
public void setUp() throws Exception {
test = new Assertion();
client = ClientBuilder.newBuilder().endpoints(TestConstants.endpoints).build();
kvClient = client.getKVClient();
leaseClient = client.getLeaseClient();
}
Aggregations