PDA

View Full Version : [Mondrian] ParallelTest



Pappyn Bart
01-23-2007, 05:50 AM
Hi Julian,

I am busy writing junit tests and derived a test from ParallelTest.

I noticed that ParallelTest will not throw any errors even if the test
fails,
so the test is kind of useless now.

It is easy to test if you set s = null before assertNotNull(s);

I notice a Worker class that catches the errors :

private static abstract class Worker implements Runnable {
Throwable throwable;

public void run() {
try {
runSafe();
} catch (Throwable e) {
throwable = e;
}
}

public abstract void runSafe();
}

But nothing is done with this afterwards.

Not sure why it is programmed this way, but I guess you forgot to write
some code...

Can you take a look ?

Thanks,
Bart


_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Julian Hyde
01-23-2007, 06:52 AM
Bart,

I think I intended to check each Worker's 'throwable' member after the join,
to make sure that each worker terminated without error. If any worker has
failed, then the test is a failure.

Julian


_____

From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
Behalf Of Pappyn Bart
Sent: Tuesday, January 23, 2007 1:45 AM
To: Julian Hyde
Cc: Mondrian developer mailing list
Subject: [Mondrian] ParallelTest


Hi Julian,

I am busy writing junit tests and derived a test from ParallelTest.

I noticed that ParallelTest will not throw any errors even if the test
fails,
so the test is kind of useless now.

It is easy to test if you set s = null before assertNotNull(s);

I notice a Worker class that catches the errors :

private static abstract class Worker implements Runnable {
Throwable throwable;

public void run() {
try {
runSafe();
} catch (Throwable e) {
throwable = e;
}
}

public abstract void runSafe();
}

But nothing is done with this afterwards.

Not sure why it is programmed this way, but I guess you forgot to write
some code...

Can you take a look ?

Thanks,
Bart



_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian