Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with WANoDuplicateUuidsTest and Magritte image #721

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 3 comments
Closed

Problems with WANoDuplicateUuidsTest and Magritte image #721

GoogleCodeExporter opened this issue Mar 25, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Hi Folks,

If I download the latest Magritte 2 image from here:
http://jenkins.lukas-renggli.ch/view/Pipeline/job/Magritte%202/ and
run the WANoDuplicateUuidsTest, it runs forever.

Well at least for an hour on my Mac before I gave up :)

This doesn't happen with the Seaside 3.0.7 one-click or image, so it
seems like something is happening while loading Magritte.

Is this a known issue?

Cheers,
Martin

P.S. Thanks for the awesome framework that Seaside is!

Original issue reported on code.google.com by renggli on 16 Apr 2012 at 7:09

@GoogleCodeExporter
Copy link
Author

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'.

Lukas

[1]: 
http://jenkins.lukas-renggli.ch/view/Pipeline/job/Seaside%203.0/lastCompletedBui
ld/testReport/Seaside.Tests.Pharo.Development/WANoDuplicateUuidsTest/

Original comment by renggli on 16 Apr 2012 at 7:11

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 ]

Original comment by renggli on 16 Apr 2012 at 7:11

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Looks good. Directly taking the UUID as a key in the dictionary makes the run 
time to from 40ms to 20ms. Not that it matters.

Name: Seaside-Tests-Pharo-Development-pmm.23
Author: pmm
Time: 16 April 2012, 5:26:10 pm
UUID: 43e2a366-7054-48dd-a24d-e1dc9a853240
Ancestors: Seaside-Tests-Pharo-Development-pmm.22

- Issue 721:    Problems with WANoDuplicateUuidsTest and Magritte image
- http://code.google.com/p/seaside/issues/detail?id=721

Name: Seaside-Tests-Pharo-Development-pmm.24
Author: pmm
Time: 16 April 2012, 5:30:15 pm
UUID: 6ffe8593-7e4e-48eb-972e-2aa89e2bfba5
Ancestors: Seaside-Tests-Pharo-Development-pmm.23

-  Issue 721:   Problems with WANoDuplicateUuidsTest and Magritte image
- merge back from 3.0

Original comment by [email protected] on 16 Apr 2012 at 3:32

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant