From c44f63c846312471e34f7ac8afe83cbe804210d6 Mon Sep 17 00:00:00 2001 From: ebanks Date: Mon, 19 Apr 2010 14:28:12 +0000 Subject: [PATCH] Fixing the performance tests: we need to catch the RuntimeException (not samtools' RuntimeIOExcpetion). Also, CountCovariates doesn't need the catch. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3196 348d0f76-0448-11de-a6fe-93d51630548a --- .../indels/IndelRealignerPerformanceTest.java | 5 ++--- .../RecalibrationWalkersPerformanceTest.java | 17 ++++------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerPerformanceTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerPerformanceTest.java index 04072f5e3..016856fc8 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerPerformanceTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerPerformanceTest.java @@ -1,6 +1,5 @@ package org.broadinstitute.sting.gatk.walkers.indels; -import net.sf.samtools.util.RuntimeIOException; import org.broadinstitute.sting.WalkerTest; import org.junit.Test; @@ -27,7 +26,7 @@ public class IndelRealignerPerformanceTest extends WalkerTest { new ArrayList(0)); try { executeTest("testRealignerTargetCreatorWholeGenome", spec1); - } catch (RuntimeIOException e) { + } catch (RuntimeException e) { // using /dev/null as an output source causes samtools to fail when it closes the stream, we shouldn't sweat it } WalkerTestSpec spec2 = new WalkerTestSpec( @@ -47,7 +46,7 @@ public class IndelRealignerPerformanceTest extends WalkerTest { new ArrayList(0)); try { executeTest("testRealignerTargetCreatorWholeExome", spec2); - } catch (RuntimeIOException e) { + } catch (RuntimeException e) { // using /dev/null as an output source causes samtools to fail when it closes the stream, we shouldn't sweat it } } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersPerformanceTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersPerformanceTest.java index f4ea206ee..9cf24a5aa 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersPerformanceTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersPerformanceTest.java @@ -1,6 +1,5 @@ package org.broadinstitute.sting.gatk.walkers.recalibration; -import net.sf.samtools.util.RuntimeIOException; import org.broadinstitute.sting.WalkerTest; import org.junit.Test; @@ -20,11 +19,7 @@ public class RecalibrationWalkersPerformanceTest extends WalkerTest { " -recalFile /dev/null", 0, new ArrayList(0)); - try { - executeTest("testCountCovariatesWholeGenome", spec); - } catch (RuntimeIOException e) { - // using /dev/null as an output source causes samtools to fail when it closes the stream, we shouldn't sweat it - } + executeTest("testCountCovariatesWholeGenome", spec); } @Test @@ -39,11 +34,7 @@ public class RecalibrationWalkersPerformanceTest extends WalkerTest { " -recalFile /dev/null", 0, new ArrayList(0)); - try { - executeTest("testCountCovariatesWholeExome", spec); - } catch (RuntimeIOException e) { - // using /dev/null as an output source causes samtools to fail when it closes the stream, we shouldn't sweat it - } + executeTest("testCountCovariatesWholeExome", spec); } @Test @@ -60,7 +51,7 @@ public class RecalibrationWalkersPerformanceTest extends WalkerTest { new ArrayList(0)); try { executeTest("testTableRecalibratorWholeGenome", spec); - } catch (RuntimeIOException e) { + } catch (RuntimeException e) { // using /dev/null as an output source causes samtools to fail when it closes the stream, we shouldn't sweat it } } @@ -79,7 +70,7 @@ public class RecalibrationWalkersPerformanceTest extends WalkerTest { new ArrayList(0)); try { executeTest("testTableRecalibratorWholeExome", spec); - } catch (RuntimeIOException e) { + } catch (RuntimeException e) { // using /dev/null as an output source causes samtools to fail when it closes the stream, we shouldn't sweat it } }