Merged bug fix from Stable into Unstable
This commit is contained in:
commit
5e9e1101a3
|
|
@ -358,7 +358,7 @@ public class HierarchicalMicroScheduler extends MicroScheduler implements Hierar
|
||||||
if (error instanceof RuntimeException)
|
if (error instanceof RuntimeException)
|
||||||
this.error = (RuntimeException)error;
|
this.error = (RuntimeException)error;
|
||||||
else
|
else
|
||||||
this.error = new ReviewedStingException("An error occurred during the traversal.", error);
|
this.error = new ReviewedStingException("An error occurred during the traversal. Message=" + error.getMessage(), error);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,6 @@ public class WalkerTest extends BaseTest {
|
||||||
Class expectedException = null;
|
Class expectedException = null;
|
||||||
boolean includeImplicitArgs = true;
|
boolean includeImplicitArgs = true;
|
||||||
boolean includeShadowBCF = true;
|
boolean includeShadowBCF = true;
|
||||||
boolean repairHeader = false;
|
|
||||||
|
|
||||||
// the default output path for the integration test
|
// the default output path for the integration test
|
||||||
private File outputFileLocation = null;
|
private File outputFileLocation = null;
|
||||||
|
|
@ -211,8 +210,6 @@ public class WalkerTest extends BaseTest {
|
||||||
String.format(" -et %s -K %s ", GATKRunReport.PhoneHomeOption.NO_ET, gatkKeyFile));
|
String.format(" -et %s -K %s ", GATKRunReport.PhoneHomeOption.NO_ET, gatkKeyFile));
|
||||||
if ( includeShadowBCF && GENERATE_SHADOW_BCF )
|
if ( includeShadowBCF && GENERATE_SHADOW_BCF )
|
||||||
args = args + " --generateShadowBCF ";
|
args = args + " --generateShadowBCF ";
|
||||||
if ( repairHeader )
|
|
||||||
args = args + " --repairVCFHeader public/data/vcfHeaderForRepairs.vcf ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
|
|
@ -224,7 +221,6 @@ public class WalkerTest extends BaseTest {
|
||||||
* which will ultimately blow up...
|
* which will ultimately blow up...
|
||||||
*/
|
*/
|
||||||
public void disableShadowBCF() { this.includeShadowBCF = false; }
|
public void disableShadowBCF() { this.includeShadowBCF = false; }
|
||||||
public void repairHeaders() { this.repairHeader = true; }
|
|
||||||
public void setOutputFileLocation(File outputFileLocation) {
|
public void setOutputFileLocation(File outputFileLocation) {
|
||||||
this.outputFileLocation = outputFileLocation;
|
this.outputFileLocation = outputFileLocation;
|
||||||
}
|
}
|
||||||
|
|
@ -367,10 +363,16 @@ public class WalkerTest extends BaseTest {
|
||||||
// it's the type we expected
|
// it's the type we expected
|
||||||
//System.out.println(String.format(" => %s PASSED", name));
|
//System.out.println(String.format(" => %s PASSED", name));
|
||||||
} else {
|
} else {
|
||||||
if ( e.getCause() != null )
|
final String message = String.format("Test %s expected exception %s but instead got %s with error message %s",
|
||||||
e.getCause().printStackTrace(System.out); // must print to stdout to see the message
|
name, expectedException, e.getClass(), e.getMessage());
|
||||||
Assert.fail(String.format("Test %s expected exception %s but instead got %s with error message %s",
|
if ( e.getCause() != null ) {
|
||||||
name, expectedException, e.getClass(), e.getMessage()));
|
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
|
final PrintStream ps = new PrintStream(baos);
|
||||||
|
e.getCause().printStackTrace(ps);
|
||||||
|
BaseTest.log(message);
|
||||||
|
BaseTest.log(baos.toString());
|
||||||
|
}
|
||||||
|
Assert.fail(message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// we didn't expect an exception but we got one :-(
|
// we didn't expect an exception but we got one :-(
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ public class EngineFeaturesIntegrationTest extends WalkerTest {
|
||||||
super(EngineErrorHandlingTestProvider.class);
|
super(EngineErrorHandlingTestProvider.class);
|
||||||
this.expectedException = exceptedException;
|
this.expectedException = exceptedException;
|
||||||
this.multiThreaded = multiThreaded;
|
this.multiThreaded = multiThreaded;
|
||||||
this.iterationsToTest = multiThreaded ? 10 : 1;
|
this.iterationsToTest = multiThreaded ? 50 : 1;
|
||||||
setName(String.format("Engine error handling: expected %s, is-multithreaded %b", exceptedException, multiThreaded));
|
setName(String.format("Engine error handling: expected %s, is-multithreaded %b", exceptedException, multiThreaded));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ public class EngineFeaturesIntegrationTest extends WalkerTest {
|
||||||
// Loop over errors to throw, make sure they are the errors we get back from the engine, regardless of NT type
|
// Loop over errors to throw, make sure they are the errors we get back from the engine, regardless of NT type
|
||||||
//
|
//
|
||||||
@Test(dataProvider = "EngineErrorHandlingTestProvider")
|
@Test(dataProvider = "EngineErrorHandlingTestProvider")
|
||||||
public void testEngineErrorHandlingTestProvider(EngineErrorHandlingTestProvider cfg) {
|
public void testEngineErrorHandlingTestProvider(final EngineErrorHandlingTestProvider cfg) {
|
||||||
for ( int i = 0; i < cfg.iterationsToTest; i++ ) {
|
for ( int i = 0; i < cfg.iterationsToTest; i++ ) {
|
||||||
final String root = "-T ErrorThrowing -R " + b37KGReference;
|
final String root = "-T ErrorThrowing -R " + b37KGReference;
|
||||||
final String args = root + (cfg.multiThreaded ? " -nt 2" : "") + " -E " + cfg.expectedException.getSimpleName();
|
final String args = root + (cfg.multiThreaded ? " -nt 2" : "") + " -E " + cfg.expectedException.getSimpleName();
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGenerateIndexForUnindexedFile() {
|
public void testGenerateIndexForUnindexedFile() {
|
||||||
File vcfFile = new File(validationDataLocation + "/ROD_validation/always_reindex.vcf");
|
File vcfFile = new File(privateTestDir + "always_reindex.vcf");
|
||||||
File vcfFileIndex = Tribble.indexFile(vcfFile);
|
File vcfFileIndex = Tribble.indexFile(vcfFile);
|
||||||
|
|
||||||
// if we can't write to the directory, don't fault the tester, just pass
|
// if we can't write to the directory, don't fault the tester, just pass
|
||||||
|
|
@ -141,7 +141,8 @@ public class RMDTrackBuilderUnitTest extends BaseTest {
|
||||||
}
|
}
|
||||||
// clean-up our test, and previous tests that may have written the file
|
// clean-up our test, and previous tests that may have written the file
|
||||||
vcfFileIndex.deleteOnExit();
|
vcfFileIndex.deleteOnExit();
|
||||||
if (vcfFileIndex.exists()) vcfFileIndex.delete();
|
if (vcfFileIndex.exists())
|
||||||
|
vcfFileIndex.delete();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
builder.loadIndex(vcfFile, new VCFCodec());
|
builder.loadIndex(vcfFile, new VCFCodec());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue