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());
}
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));
}
}
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());
}
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);
}
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;
}
}
}
}
Aggregations