[Pharo-project] SystemNavigationTest>>setUp looks quite strange to me
Hi guillermo I saw that you modified setUp super setUp. oldMonticelloAnnouncer := SystemAnnouncer privateAnnouncer. SystemAnnouncer instVarNamed: 'privateAnnouncer' put: nil. navigator := self createSystemNavigationToTest. classFactory := self createClassFactory. Now I would like to understand why? Especially because privateAnnouncer should not be used and touched. SystemAnnouncer privateAnnouncer returns an announcer that should only be used by internal (not tools). BTW the teardown looks wrong to me. Stef
On Mon, May 21, 2012 at 7:57 AM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote:
Hi guillermo
I saw that you modified
setUp super setUp.
oldMonticelloAnnouncer := SystemAnnouncer privateAnnouncer. SystemAnnouncer instVarNamed: 'privateAnnouncer' put: nil.
navigator := self createSystemNavigationToTest. classFactory := self createClassFactory.
Now I would like to understand why? Especially because privateAnnouncer should not be used and touched.
The problem is that somehow the test is not silent. Executing that test without that makes announcements to be raised with fake classes created on test time, and people subscribed to those announcements break. For example, Nautilus+Rpackage are not expecting classes that are not packaged with RPackage.
SystemAnnouncer privateAnnouncer returns an announcer that should only be used by internal (not tools).
Actually, it's just a patch to make the tests run. But the real problem is the non-silentlyness of the tests.
BTW the teardown looks wrong to me.
Yeap, I got it wrong there. But now I do not know if to fix the patch or attack the real issue is the way to go :). Look at my comment in the issue tracker. Guille
2012/5/21 Guillermo Polito <guillermopolito@gmail.com>:
On Mon, May 21, 2012 at 7:57 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guillermo
I saw that you modified
setUp     super setUp.
    oldMonticelloAnnouncer := SystemAnnouncer privateAnnouncer.     SystemAnnouncer instVarNamed: 'privateAnnouncer' put: nil.
    navigator := self createSystemNavigationToTest.     classFactory := self createClassFactory.
Now I would like to understand why? Especially because privateAnnouncer should not be used and touched.
The problem is that somehow the test is not silent. Executing that test without that makes announcements to be raised with fake classes created on test time, and people subscribed to those announcements break. For example, Nautilus+Rpackage are not expecting classes that are not packaged with RPackage.
I don't know anything of Rpackage, nor browsed any code, but it sounds like a requirement for Rpackage : being robust to unpackaged clases/methods. Nicolas
SystemAnnouncer privateAnnouncer returns an announcer that should only be used by internal (not tools).
Actually, it's just a patch to make the tests run. But the real problem is the non-silentlyness of the tests.
BTW the teardown looks wrong to me.
Yeap, I got it wrong there. But now I do not know if to fix the patch or attack the real issue is the way to go :). Look at my comment in the issue tracker.
Guille
The problem is that somehow the test is not silent. Executing that test without that makes announcements to be raised with fake classes created on test time, and people subscribed to those announcements break. For example, Nautilus+Rpackage are not expecting classes that are not packaged with RPackage.
I don't know anything of Rpackage, nor browsed any code, but it sounds like a requirement for Rpackage : being robust to unpackaged clases/methods.
Yes but the problem is not there. Nautilus got event that it should not get and it is checking that a package is created in RPackageOrganizer (but the test does it on purpose on an empty organizer). So we identified the problem and we will look at it after 15h30.
participants (3)
-
Guillermo Polito -
Nicolas Cellier -
Stéphane Ducasse