|
From: Peter C. <pce...@ma...> - 2002-04-23 23:52:38
|
I did the same research on OS X commits and found the same
conclusion. I sent some more specific info to Brian about this
issue, but I should have sent it to the entire list. Here are
some excerpts:
I just ran GlobalModelOtherTest in the textui.TestRunner, and I
got some very interesting results. If I run it as it stands in
CVS, I get a hang in testInteractionAbort. If I uncomment the
println calls, the test passes. It seems to me that this would
indicate an extremely narrow race condition.
-----
Later
-----
After a bunch of commenting and uncommenting, I've discovered
some more specific trends. The call that hangs is near the end
of the test:
// now make sure it still works!
assertEquals("5", interpret("5"));
If the code looks like this, I get consistent hangs from that call:
public void interactionsExited(int status) {
//System.err.println("exit notice");
assertInteractionStartCount(1);
interactionsExitedCount++;
}
If I uncomment that particular println, I only get hangs about
half of the times that I run the tests directly in junit. It
doesn't appear to matter if the call is made before or after the
meaningful contents of that method. I also tried adding a sleep
call inside the method and commenting out the println. Sleeping
for 300ms and 1s didn't guarantee success, but it worked about
as well as with the println enabled.
Also, running under the GUI TestRunner seems to slow things down
enough that I haven't seen a hang yet.
--
Peter
|