[squeak-dev] Release candidate Squeak4.4-12319 Test Results Cog OSX

Frank Shearar frank.shearar at gmail.com
Thu Dec 20 08:01:24 UTC 2012


On 20 December 2012 07:52, Frank Shearar <frank.shearar at gmail.com> wrote:
> On 20 December 2012 07:39, Colin Putney <colin at wiresong.com> wrote:
>>
>>
>> On Thu, Dec 20, 2012 at 2:08 AM, Frank Shearar <frank.shearar at gmail.com>
>> wrote:
>>>
>>> So I tried an experiment last night where I manually re-added
>>> MCMockClassA >> #one, which failed dismally. Would adding
>>> "MCMockPackageInfo initialize" be the right thing to do in MCTestCase
>>> >> #tearDown? (That seems kind've strange; I don't see why that would
>>> re-add a deleted method, for instance. Unless initialising wiped out
>>> local changes... I'll try this out on the train to work today.)
>>
>>
>> It just needs to be executed before the image is shipped. The problem is
>> that PackageInfo class>>named: used to find PackageInfo subclasses, back
>> when the MC tests were written. Then the behaviour of PackageInfo was
>> changed, so that PackageInfo subclasses have to register themselves during
>> class initialization. But since MC was already in the base image, the class
>> initialize method for MCMockPackageInfo was never called.
>>
>> As a result, the 'MonticelloMocks' package that the MC tests use is a
>> vanilla PackageInfo instance, which is empty. That leads to the
>> MCSnapshotResource for a test run being empty, which causes #tearDown
>> methods to fail to restore the mocks after a test that alters them. That's
>> why #one is missing.
>
> Right. And the reason for THAT is because this image is derived from a
> 4.3 image - pre the PackageInfo change - and has never had the
> necessary state reset!

But that doesn't explain why CI didn't experience/report these failures.

frank

>> Ultimately, this isn't a problem in the code, it's in the state of the
>> image. All you have to do is execute "MCMockPackageInfo initialize" *before*
>> running the tests, and everything works fine. Add it to ReleaseBuilder so
>> that the image will ship with a properly initialized mocks package.
>
> I shall!
>
>> Colin
>>
>>
>>


More information about the Squeak-dev mailing list