[BUG] SUnit failure debugging is allowing #tearDown to run
before performing the test
Rob Withers
rwithers12 at comcast.net
Sun Feb 15 19:07:05 UTC 2004
On Sunday, February 15, 2004, at 10:55 AM, Marcus Denker wrote:
>
> Am 15.02.2004 um 19:33 schrieb Rob Withers:
>
>> 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.
>>
>
> Can you check this with the latest SUnit version on SqueakMap? This
> has a couple of fixes, one (done by Ned) should
> fix this.
>
Yep, that fixes it alright. I like it. So, are there plans on
putting this in the update stream? SUnit looks to be in the basic
image, but I really haven't been following these discussions.
ty,
Rob
More information about the Squeak-dev
mailing list
|