Skip to content

Commit

Permalink
dealing with stupoid exact text match
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbenjamin committed Mar 7, 2024
1 parent be4b7de commit 2f1c832
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import htsjdk.variant.variantcontext.VariantContext;
import htsjdk.variant.vcf.VCFConstants;
import htsjdk.variant.vcf.VCFHeader;
import htsjdk.variant.vcf.VCFUtils;
import org.apache.commons.collections4.SetUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.broadinstitute.hellbender.CommandLineProgramTest;
Expand Down Expand Up @@ -1088,7 +1089,18 @@ public void testExposureOfSmithWatermanParametersIsConsistentWithPastResults(fin
};

runCommandLine(args);
IntegrationTestSpec.assertEqualTextFiles(output, expected);

// This used to be an exact text match, which cause hours of aggravation when the test passed locally and
// failed on the cloud.
final double[] outputTlods = VariantContextTestUtils.streamVcf(output)
.flatMap(vc -> vc.getAttributeAsDoubleList(GATKVCFConstants.TUMOR_LOG_10_ODDS_KEY, 0).stream())
.mapToDouble(x -> x).toArray();

final double[] expectedTlods = VariantContextTestUtils.streamVcf(expected)
.flatMap(vc -> vc.getAttributeAsDoubleList(GATKVCFConstants.TUMOR_LOG_10_ODDS_KEY, 0).stream())
.mapToDouble(x -> x).toArray();

Assert.assertEquals(outputTlods, expectedTlods);
}

@SafeVarargs
Expand Down

0 comments on commit 2f1c832

Please sign in to comment.