Minor: cleaner way of turning off index-on-the-fly checking in case we want to turn it back on.
This commit is contained in:
parent
344a938a70
commit
5c5d8e7cd3
|
|
@ -47,6 +47,7 @@ import java.util.*;
|
||||||
|
|
||||||
public class WalkerTest extends BaseTest {
|
public class WalkerTest extends BaseTest {
|
||||||
private static final boolean ENABLE_PHONE_HOME_FOR_TESTS = false;
|
private static final boolean ENABLE_PHONE_HOME_FOR_TESTS = false;
|
||||||
|
private static final boolean ENABLE_ON_THE_FLY_CHECK_FOR_VCF_INDEX = false;
|
||||||
|
|
||||||
@BeforeMethod
|
@BeforeMethod
|
||||||
public void initializeRandomGenerator() {
|
public void initializeRandomGenerator() {
|
||||||
|
|
@ -58,6 +59,9 @@ public class WalkerTest extends BaseTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void maybeValidateSupplementaryFile(final String name, final File resultFile) {
|
public void maybeValidateSupplementaryFile(final String name, final File resultFile) {
|
||||||
|
if ( !ENABLE_ON_THE_FLY_CHECK_FOR_VCF_INDEX )
|
||||||
|
return;
|
||||||
|
|
||||||
File indexFile = Tribble.indexFile(resultFile);
|
File indexFile = Tribble.indexFile(resultFile);
|
||||||
//System.out.println("Putative index file is " + indexFile);
|
//System.out.println("Putative index file is " + indexFile);
|
||||||
if ( indexFile.exists() ) {
|
if ( indexFile.exists() ) {
|
||||||
|
|
@ -75,13 +79,13 @@ public class WalkerTest extends BaseTest {
|
||||||
System.out.println("Verifying on-the-fly index " + indexFile + " for test " + name + " using file " + resultFile);
|
System.out.println("Verifying on-the-fly index " + indexFile + " for test " + name + " using file " + resultFile);
|
||||||
Index indexFromOutputFile = IndexFactory.createIndex(resultFile, new VCFCodec());
|
Index indexFromOutputFile = IndexFactory.createIndex(resultFile, new VCFCodec());
|
||||||
Index dynamicIndex = IndexFactory.loadIndex(indexFile.getAbsolutePath());
|
Index dynamicIndex = IndexFactory.loadIndex(indexFile.getAbsolutePath());
|
||||||
/* tmp disable
|
|
||||||
if ( ! indexFromOutputFile.equalsIgnoreProperties(dynamicIndex) ) {
|
if ( ! indexFromOutputFile.equalsIgnoreProperties(dynamicIndex) ) {
|
||||||
Assert.fail(String.format("Index on disk from indexing on the fly not equal to the index created after the run completed. FileIndex %s vs. on-the-fly %s%n",
|
Assert.fail(String.format("Index on disk from indexing on the fly not equal to the index created after the run completed. FileIndex %s vs. on-the-fly %s%n",
|
||||||
indexFromOutputFile.getProperties(),
|
indexFromOutputFile.getProperties(),
|
||||||
dynamicIndex.getProperties()));
|
dynamicIndex.getProperties()));
|
||||||
}
|
}
|
||||||
*/ }
|
}
|
||||||
|
|
||||||
public List<String> assertMatchingMD5s(final String name, List<File> resultFiles, List<String> expectedMD5s) {
|
public List<String> assertMatchingMD5s(final String name, List<File> resultFiles, List<String> expectedMD5s) {
|
||||||
List<String> md5s = new ArrayList<String>();
|
List<String> md5s = new ArrayList<String>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue