The reason for this change (which I did with Oscar at Lille) was to avoid the author dialog when running tests. It is very annoying because when you run all the tests, get a coffee, and later come back, the test runner would wait for your input halfway through. Now the first solution below had the annoying problem that 'TestRunner' ends up as your initials when you compiled a method and the testrunner has not returned, e.g., because you have a halt in the code. To improve this, I slightly changed the behavior as follows: (comment from issue #1379): A preliminary fix is in #10494. Now the name 'TestRunner' is only used if no author was set before starting the tests. The implementation of temporarily setting another author name is too simple to cope with the suspending of a process and opening a debugger from a failed assertion. In this case, one would ideally want to use the real author. The desired behavior could be implemented using a dynamic variable to request the author. The test runner could then catch the notification and return the temporary author. This would then not interfere with compiling methods in the debugger because it runs in a different call stack. As Lukas suggests, instead fixing the offending tests is also a possible solution. If possible, though, I would prefer a generic solution. Adrian On Jan 10, 2010, at 09:40 , Lukas Renggli wrote:
Looks like the code of Adrian Lienhard ;-)
I guess that it tries to fix tests so that they do not pup-up a dialog when they compile code.
Initially the code in SUnit was like this:
TestCase>>runCase [self setUp. self performTest] ensure: [ self tearDown. self cleanUpInstanceVariables ] ]
Then it was change to this (this is where I discovered the issue):
TestCase>>runCase Author useAuthor: 'TestRunner' during: [ [self setUp. self performTest] ensure: [ self tearDown. self cleanUpInstanceVariables ] ]
In the latest version it was changed again:
TestCase>>runCase Author ifUnknownAuthorUse: 'TestRunner' during: [ [self setUp. self performTest] ensure: [ self tearDown. self cleanUpInstanceVariables ] ]
In any case the author name is 'TestRunner' if you edit source code anywhere in the system when a debugger on a test is open. Also I am not sure what happens if you have multiple debuggers on tests open, that might give very strange situations.
I suggest that we revert to the earliest presented version of the method in question, and fix the particular tests that compile code.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project