@@ -55,17 +55,18 @@ public class ParallelTest {
/** the build file associated with this test */
/** the build file associated with this test */
public static final String TEST_BUILD_FILE = "src/etc/testcases/taskdefs/parallel.xml";
public static final String TEST_BUILD_FILE = "src/etc/testcases/taskdefs/parallel.xml";
private Project p;
/** The JUnit setup method */
/** The JUnit setup method */
@Before
@Before
public void setUp() {
public void setUp() {
buildRule.configureProject(TEST_BUILD_FILE);
buildRule.configureProject(TEST_BUILD_FILE);
p = buildRule.getProject();
}
}
/** tests basic operation of the parallel task */
/** tests basic operation of the parallel task */
@Test
@Test
public void testBasic() {
public void testBasic() {
// should get no output at all
// should get no output at all
Project p = buildRule.getProject();
p.setUserProperty("test.direct", DIRECT_MESSAGE);
p.setUserProperty("test.direct", DIRECT_MESSAGE);
p.setUserProperty("test.delayed", DELAYED_MESSAGE);
p.setUserProperty("test.delayed", DELAYED_MESSAGE);
buildRule.executeTarget("testBasic");
buildRule.executeTarget("testBasic");
@@ -81,7 +82,6 @@ public class ParallelTest {
@Test
@Test
public void testThreadCount() {
public void testThreadCount() {
// should get no output at all
// should get no output at all
Project p = buildRule.getProject();
p.setUserProperty("test.direct", DIRECT_MESSAGE);
p.setUserProperty("test.direct", DIRECT_MESSAGE);
p.setUserProperty("test.delayed", DELAYED_MESSAGE);
p.setUserProperty("test.delayed", DELAYED_MESSAGE);
buildRule.executeTarget("testThreadCount");
buildRule.executeTarget("testThreadCount");
@@ -140,7 +140,6 @@ public class ParallelTest {
// should get no output at all
// should get no output at all
thrown.expect(BuildException.class);
thrown.expect(BuildException.class);
thrown.expectMessage(FAILURE_MESSAGE);
thrown.expectMessage(FAILURE_MESSAGE);
Project p = buildRule.getProject();
p.setUserProperty("test.failure", FAILURE_MESSAGE);
p.setUserProperty("test.failure", FAILURE_MESSAGE);
p.setUserProperty("test.delayed", DELAYED_MESSAGE);
p.setUserProperty("test.delayed", DELAYED_MESSAGE);
buildRule.executeTarget("testFail");
buildRule.executeTarget("testFail");
@@ -149,7 +148,6 @@ public class ParallelTest {
/** tests the demuxing of output streams in a multithreaded situation */
/** tests the demuxing of output streams in a multithreaded situation */
@Test
@Test
public void testDemux() {
public void testDemux() {
Project p = buildRule.getProject();
p.addTaskDefinition("demuxtest", DemuxOutputTask.class);
p.addTaskDefinition("demuxtest", DemuxOutputTask.class);
synchronized (System.out) {
synchronized (System.out) {
PrintStream out = System.out;
PrintStream out = System.out;