Search in sources :

Example 61 with BeforeTest

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);
}
Also used : HBaseBasedAuditRepository(org.apache.atlas.repository.audit.HBaseBasedAuditRepository) TypesDef(org.apache.atlas.typesystem.TypesDef) TypeNotFoundException(org.apache.atlas.typesystem.exception.TypeNotFoundException) Id(org.apache.atlas.typesystem.persistence.Id) BeforeTest(org.testng.annotations.BeforeTest)

Example 62 with BeforeTest

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);
}
Also used : ArrayList(java.util.ArrayList) SAMSequenceRecord(htsjdk.samtools.SAMSequenceRecord) SAMSequenceDictionary(htsjdk.samtools.SAMSequenceDictionary) BeforeTest(org.testng.annotations.BeforeTest)

Example 63 with BeforeTest

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();
}
Also used : Assertion(org.testng.asserts.Assertion) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

BeforeTest (org.testng.annotations.BeforeTest)63 HashMap (java.util.HashMap)8 CommandManager (com.sun.identity.cli.CommandManager)6 Injector (com.google.inject.Injector)4 PinotHelixResourceManager (com.linkedin.pinot.controller.helix.core.PinotHelixResourceManager)4 File (java.io.File)4 AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)3 SSOException (com.iplanet.sso.SSOException)2 Schema (com.linkedin.pinot.common.data.Schema)2 SegmentGeneratorConfig (com.linkedin.pinot.core.indexsegment.generator.SegmentGeneratorConfig)2 SegmentIndexCreationDriver (com.linkedin.pinot.core.segment.creator.SegmentIndexCreationDriver)2 SegmentIndexCreationDriverImpl (com.linkedin.pinot.core.segment.creator.impl.SegmentIndexCreationDriverImpl)2 ThirdEyeConfigProperties (com.linkedin.thirdeye.hadoop.config.ThirdEyeConfigProperties)2 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)2 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)2 SMSException (com.sun.identity.sm.SMSException)2 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)2 URL (java.net.URL)2 ArrayList (java.util.ArrayList)2 ZkClient (org.I0Itec.zkclient.ZkClient)2