[BUG] SUnit failure debugging is allowing #tearDown to run before
performing the test
Rob Withers
reefedjib at yahoo.com
Sun Feb 15 18:33:29 UTC 2004
Attached is a simple test case which will fail. When you click it in
the failure pane to debug it, you can look at the value of the val
ivar. It will be 2 in the current image (3.7a - 5657), which means
the #tearDown method ran before you have a chance to step through your
test. In looking at #openDebuggerOnFailingTestMethod, it now forks a
block to the debugger and walks the stack into the test method. This
is great, since I can't stand the halt technique used before. However,
this allows the active stack to unwind before the debugging has
occurred, and runs #tearDown in an ensure: block. I tried slapping a
semaphore in there but this blocks the UIProcess.. I restored the
original impl and it works correctly. With the test, the val remains 1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SUnitTearDownBeforeDebugCompletionTestCase.st
Type: application/text
Size: 684 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040215/88556b8e/SUnitTearDownBeforeDebugCompletionTestCase.bin
More information about the Squeak-dev
mailing list
|