[Seaside] Problems with WANoDuplicateUuidsTest and Magritte image
Lukas Renggli
renggli at gmail.com
Mon Apr 16 07:09:48 UTC 2012
This is the same problem in Seaside 3.0 and 3.1.
I've created http://code.google.com/p/seaside/issues/detail?id=721
Lukas
On 16 April 2012 09:05, Lukas Renggli <renggli at gmail.com> wrote:
> I believe the following replacement would test the same with much less
> code and without falling into the infinite loop trap:
>
> testNoDuplicateUuids
> | workingCopies versionAncestries uuidsToVersion |
> workingCopies := WADevelopment allPackages
> collect: [ :each | WADevelopment workingCopyFor: each ].
> versionAncestries := workingCopies
> gather: [ :each | each ancestry breadthFirstAncestors ].
> uuidsToVersion := Dictionary new: versionAncestries size.
> versionAncestries do: [ :version |
> (uuidsToVersion includesKey: version id name)
> ifTrue: [ self signalFailure: version name , ' and ' ,
> (uuidsToVersion at: version id name) name , ' have duplicated UUIDs'
> ].
> uuidsToVersion at: version id name put: version ]
>
> Lukas
>
> On 16 April 2012 08:57, Philippe Marschall <philippe.marschall at gmail.com> wrote:
>> On Mon, Apr 16, 2012 at 8:48 AM, Lukas Renggli <renggli at gmail.com> wrote:
>>> Good catch!
>>>
>>> Normally this test is run directly after Seaside is loaded [1], where
>>> it passes. It seems to loop on 'Magritte-Seaside' though. Looks like
>>> the ancestry there is somehow broken :-(
>>>
>>> +philippe.marschall
>>>
>>> I wonder why this test duplicates the (complicated) logic to traverse
>>> package ancestries instead of using #topologicalAncestors or
>>> #withBreadthFirstAncestry? These two methods would work, even on the
>>> broken 'Magritte-Seaside'.
>>
>> I'll have a look.
>>
>> Cheers
>> Philippe
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
--
Lukas Renggli
www.lukas-renggli.ch
More information about the seaside
mailing list