Calypso debugging across #wait with multithreaded tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Calypso debugging across #wait with multithreaded tests

Ben Coman
Before I log an issue...
in Pharo 7 using Calypso to run a test by clicking its status-dot,
when trying to step <Over> a semaphore #wait the UI locks up.

I presumed this was due to the #wait effectively occurring in the main UI thread,
so I solved this by forking the test as follows.  Is that a reasonable thing to do?

ClyRunTestsFromMethodsCommand >> runTest: testSelector of: testClass
[
| testResult |
testResult := testClass debug: testSelector.
self
notifyUserAboutResults: testResult 
with: 'Method: ' , testClass asString , '>>#' , testSelector asString
] forkNamed: 'TESTING ' , testClass asString , '>>#' , testSelector asString


With that change, you can step over a #wait as if it wasn't there,
which IIRC is in line with the old behaviour.

Now a bit of a dream, but even better would be that just the debugger stepping 
over the #wait was suspended (rather than the whole UI) with 
an indication like a red border.  When the #wait was signaled,
the red border would disappear and the debugger might jump to the top.

cheers -ben