Issue 4338 in pharo: testAllDictionariesAreHealthy sometimes fails...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 4338 in pharo: testAllDictionariesAreHealthy sometimes fails...

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.3

New issue 4338 by [hidden email]: testAllDictionariesAreHealthy  
sometimes fails...
http://code.google.com/p/pharo/issues/detail?id=4338

... but not after doing a GC.

So we should add a gc call in the test?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4338 in pharo: testAllDictionariesAreHealthy sometimes fails...

pharo

Comment #1 on issue 4338 by [hidden email]:  
testAllDictionariesAreHealthy  sometimes fails...
http://code.google.com/p/pharo/issues/detail?id=4338

I think we should check tests who creating bad dictionaries first.
If they doing it on purpose, then its ok.. but if not, then there are
abuse or some caveats in dictionary itself, which leads to creating
bad dictionaries.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4338 in pharo: testAllDictionariesAreHealthy sometimes fails...

pharo

Comment #2 on issue 4338 by [hidden email]:  
testAllDictionariesAreHealthy  sometimes fails...
http://code.google.com/p/pharo/issues/detail?id=4338

Hi

There is a 'bad' Dictionary left after DictionaryTest>>testHealthyWorks is  
executed.
I'm guessing this only happens sometimes because of GC.

Method should clean up, maybe as below?

testHealthyWorks
        "we use associations as keys on purpose, because they changing
        hash depending on the key"
        | a1 a2 dict |
        dict := Dictionary new.
        [a1 := 1 -> 2.
        a2 := 2 -> 2.
        dict at: a1 put: 2;
                 at: a2 put: 3.
        self assert: dict isHealthy.
        a1 key: 0.
        a2 key: 0.
        self assert: dict isHealthy not]
                ensure: [dict removeAll]


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4338 in pharo: testAllDictionariesAreHealthy sometimes fails...

pharo
Updates:
        Status: FixProposed

Comment #3 on issue 4338 by [hidden email]:  
testAllDictionariesAreHealthy  sometimes fails...
http://code.google.com/p/pharo/issues/detail?id=4338

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4338 in pharo: testAllDictionariesAreHealthy sometimes fails...

pharo
Updates:
        Status: Closed

Comment #4 on issue 4338 by [hidden email]:  
testAllDictionariesAreHealthy  sometimes fails...
http://code.google.com/p/pharo/issues/detail?id=4338

Thanks, this works!

in 13239


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker