You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Manish Khettry <mk...@bdnacorp.com> on 2003/02/20 18:47:33 UTC

junit behavior in ant 1.5 vs 1.3

I recently upgraded our build machine to use 1.5 from 1.3 and the behavior of junit seems to have changed substantially. 

1. The standard output and error of the tests now goes to the outfile instead of standard output. This causes problems for us because we use an xml formatter and some of our output is XML itself. In addition, sometimes one of our many tests hang for some reason. Ofcourse, when the test is run by itself it passes, but when run with 100+ other test it hangs. Since the stdout is sent to a file and the test timesout after a while, I can't look at the stdout anymore to see how far the test progressed.

2. Some of our multithreaded tests seem to hang. It looks like the threads created by the test never seem to run. Is there any known problems with ant 1.5.1 on this count? The test looks something like this:

	public static class Client extends Thread {
		int m_id;
		public void run() {
		}
		public Client(int id) {
			m_id = id;
		}
	}

	public void testMTClient() {
		Client[] clientThread;
		for (int i = 0; i < NUM_CLIENTS; i++) {
			clientThread[i] = new Client(i);
		}

		/* start the threads and wait for exit condition 
		   to be satisfied.
		 */
	}

Re: junit behavior in ant 1.5 vs 1.3

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 20 Feb 2003, Manish Khettry <mk...@bdnacorp.com> wrote:

> 1. The standard output and error of the tests now goes to the
> outfile instead of standard output.

Well, really in addition to standard output if you use the
withOutAndErr value for the printsummary attribute.

> This causes problems for us because we use an xml formatter and some
> of our output is XML itself.

The output is supposed to be wrapped into a CDATA section in 1.5, do
you see anything different?

> Since the stdout is sent to a file and the test timesout after a
> while, I can't look at the stdout anymore to see how far the test
> progressed.

see above.

> 2. Some of our multithreaded tests seem to hang. It looks like the
> threads created by the test never seem to run.

This shouldn't have changed between 1.3 and 1.5.x.

> 3. When a test suite times out, the output file has no data. This
> causes junitreport to not even generate information about this
> test.

It wouldn't have any in 1.3 either:
<http://issues.apache.org/bugzilla/show_bug.cgi?id=2499>

will be fixed in 1.5.2 due to be released Real Soon Now(tm).

Stefan