Fix for problem where err stream remapped to output stream in certain cases, (hopefully) completing Matt's hat trick of fail. Thanks, unit tests.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1634 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
eedf55e94d
commit
01a9b1c63b
|
|
@ -75,7 +75,7 @@ public abstract class OutputTracker {
|
|||
|
||||
errStub = (errFileName != null) ? new OutputStreamStub(new File(errFileName))
|
||||
: new OutputStreamStub(System.err);
|
||||
addOutput(errStub,new OutputStreamStorage(outStub));
|
||||
addOutput(errStub,new OutputStreamStorage(errStub));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ package org.broadinstitute.sting.gatk.io;
|
|||
import org.junit.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.broadinstitute.sting.utils.io.RedirectingOutputStream;
|
||||
import org.broadinstitute.sting.BaseTest;
|
||||
import org.broadinstitute.sting.gatk.io.OutputTracker;
|
||||
import org.broadinstitute.sting.gatk.io.DirectOutputTracker;
|
||||
import org.broadinstitute.sting.gatk.io.stubs.OutputStreamStub;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -81,7 +78,7 @@ public class OutputTrackerTest extends BaseTest {
|
|||
Assert.assertSame("OutputTracker: Error stream incorrectly initialized.", System.err, errStream.getOutputStream());
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void testErrorStreamAlone() throws FileNotFoundException {
|
||||
OutputTracker ot = new DirectOutputTracker();
|
||||
ot.initializeCoreIO(null,ERROR_FILENAME);
|
||||
|
|
@ -102,7 +99,7 @@ public class OutputTrackerTest extends BaseTest {
|
|||
Assert.assertEquals("OutputTracker: Written error text is incorrect", errText, ERROR_TEXT);
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void testIndependentStreams() throws FileNotFoundException {
|
||||
OutputTracker ot = new DirectOutputTracker();
|
||||
ot.initializeCoreIO(OUTPUT_FILENAME,ERROR_FILENAME);
|
||||
|
|
|
|||
Loading…
Reference in New Issue