Search in sources :

Example 71 with BeforeClass

use of org.testng.annotations.BeforeClass in project gatk by broadinstitute.

the class ReadThreadingAssemblerUnitTest method setup.

@BeforeClass
public void setup() throws FileNotFoundException {
    seq = new CachingIndexedFastaSequenceFile(new File(hg19_chr1_1M_Reference));
    header = ArtificialReadUtils.createArtificialSamHeader(seq.getSequenceDictionary());
}
Also used : CachingIndexedFastaSequenceFile(org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile) CachingIndexedFastaSequenceFile(org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile) File(java.io.File) IndexedFastaSequenceFile(htsjdk.samtools.reference.IndexedFastaSequenceFile) BeforeClass(org.testng.annotations.BeforeClass)

Example 72 with BeforeClass

use of org.testng.annotations.BeforeClass in project gatk-protected by broadinstitute.

the class GetHetCoverageIntegrationTest method initHeaders.

@BeforeClass
public void initHeaders() throws IOException {
    try (final SamReader normalBamReader = SamReaderFactory.makeDefault().open(NORMAL_BAM_FILE);
        final SamReader tumorBamReader = SamReaderFactory.makeDefault().open(TUMOR_BAM_FILE)) {
        normalHeader = normalBamReader.getFileHeader();
        tumorHeader = tumorBamReader.getFileHeader();
        normalHetPulldownExpected = new Pulldown(normalHeader);
        normalHetPulldownExpected.add(new AllelicCount(new SimpleInterval("1", 11522, 11522), 7, 4));
        normalHetPulldownExpected.add(new AllelicCount(new SimpleInterval("1", 12098, 12098), 8, 6));
        normalHetPulldownExpected.add(new AllelicCount(new SimpleInterval("1", 14630, 14630), 9, 8));
        normalHetPulldownExpected.add(new AllelicCount(new SimpleInterval("2", 14689, 14689), 6, 9));
        normalHetPulldownExpected.add(new AllelicCount(new SimpleInterval("2", 14982, 14982), 6, 5));
        tumorHetPulldownExpected = new Pulldown(tumorHeader);
        tumorHetPulldownExpected.add(new AllelicCount(new SimpleInterval("1", 11522, 11522), 7, 4));
        tumorHetPulldownExpected.add(new AllelicCount(new SimpleInterval("1", 12098, 12098), 8, 6));
        tumorHetPulldownExpected.add(new AllelicCount(new SimpleInterval("1", 14630, 14630), 9, 8));
        tumorHetPulldownExpected.add(new AllelicCount(new SimpleInterval("2", 14689, 14689), 6, 9));
        tumorHetPulldownExpected.add(new AllelicCount(new SimpleInterval("2", 14982, 14982), 6, 5));
    }
}
Also used : SamReader(htsjdk.samtools.SamReader) Pulldown(org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown) SimpleInterval(org.broadinstitute.hellbender.utils.SimpleInterval) AllelicCount(org.broadinstitute.hellbender.tools.exome.alleliccount.AllelicCount) BeforeClass(org.testng.annotations.BeforeClass)

Example 73 with BeforeClass

use of org.testng.annotations.BeforeClass in project jdk8u_jdk by JetBrains.

the class SyncFactoryPermissionsTests method setUpClass.

/*
     * Install a SeeurityManager along with a base Policy to allow testNG to run
     */
@BeforeClass
public static void setUpClass() throws Exception {
    setPolicy(new TestPolicy());
    System.setSecurityManager(new SecurityManager());
}
Also used : TestPolicy(util.TestPolicy) BeforeClass(org.testng.annotations.BeforeClass)

Example 74 with BeforeClass

use of org.testng.annotations.BeforeClass in project JGroups by belaban.

the class LockServiceTest method init.

@BeforeClass
protected void init() throws Exception {
    c1 = createChannel("A");
    s1 = new LockService(c1);
    c1.connect("LockServiceTest");
    c2 = createChannel("B");
    s2 = new LockService(c2);
    c2.connect("LockServiceTest");
    c3 = createChannel("C");
    s3 = new LockService(c3);
    c3.connect("LockServiceTest");
    Util.waitUntilAllChannelsHaveSameView(10000, 1000, c1, c2, c3);
    lock = s1.getLock(LOCK);
}
Also used : LockService(org.jgroups.blocks.locking.LockService) BeforeClass(org.testng.annotations.BeforeClass)

Example 75 with BeforeClass

use of org.testng.annotations.BeforeClass in project carbon-apimgt by wso2.

the class DAOIntegrationTestBase method init.

@BeforeClass
public void init() throws Exception {
    // This used to check connection healthy
    if (H2.equals(database)) {
        dataSource = new H2DataSource();
    } else if (MYSQL.contains(database)) {
        dataSource = new MySQLDataSource();
    } else if (POSTGRES.contains(database)) {
        dataSource = new PostgreDataSource();
    } else if (MSSQL.contains(database)) {
        dataSource = new MSSQLDataSource();
    } else if (ORACLE.contains(database)) {
        dataSource = new OracleDataSource();
    }
    int maxRetries = 5;
    long maxWait = 5000;
    while (maxRetries > 0) {
        try (Connection connection = dataSource.getConnection()) {
            log.info("Database Connection Successful");
            break;
        } catch (Exception e) {
            if (maxRetries > 0) {
                log.warn("Couldn't connect into database retrying after next 5 seconds");
                maxRetries--;
                try {
                    Thread.sleep(maxWait);
                } catch (InterruptedException e1) {
                }
            } else {
                log.error("Max tries 5 exceed to connect");
                throw e;
            }
        }
    }
}
Also used : Connection(java.sql.Connection) SQLException(java.sql.SQLException) IOException(java.io.IOException) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

BeforeClass (org.testng.annotations.BeforeClass)1186 Series (com.axibase.tsd.api.model.series.Series)178 File (java.io.File)157 ArrayList (java.util.ArrayList)78 HashMap (java.util.HashMap)43 ClusterControllerManager (org.apache.helix.integration.manager.ClusterControllerManager)37 Injector (com.google.inject.Injector)36 Properties (java.util.Properties)35 Path (org.apache.hadoop.fs.Path)33 ClusterSetup (org.apache.helix.tools.ClusterSetup)33 Configuration (org.apache.hadoop.conf.Configuration)31 BigDecimal (java.math.BigDecimal)29 URL (java.net.URL)28 MockParticipantManager (org.apache.helix.integration.manager.MockParticipantManager)27 Date (java.util.Date)26 Server (org.eclipse.jetty.server.Server)25 ServerConnector (org.eclipse.jetty.server.ServerConnector)25 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)23 IOException (java.io.IOException)23 Path (java.nio.file.Path)23