[Pharo-project] Issue 3980 in pharo: TestResource fails to makeAvailable an never recovers

pharo at googlecode.com pharo at googlecode.com
Sun Apr 10 21:30:36 CEST 2011


Status: Accepted
Owner: guillerm... at gmail.com

New issue 3980 by guillerm... at gmail.com: TestResource fails to  
makeAvailable an never recovers
http://code.google.com/p/pharo/issues/detail?id=3980

Using Pharo 1.2

TestResource>>makeAvailable
     "This method must be the _only_ way to set a notNil value for the  
unique instance (current).  First, obtain a candidate instance and set  
current to a notNil placeholder (any notNil object not an instance of me  
would do;  this version uses false).  Next, check any subordinate resources  
needed by this resource.  Lastly, setUp the candidate and put it in current  
if it is available, ensuring that it is torn down otherwise."

     | candidate |
     current := false.
     candidate := self new.
     ....


And everywhere in the class, the check over the current var is done like

current isNil ifTrue: ....

So once that var is initialized, but the makeAvailable fails, it always  
fails...





More information about the Pharo-project mailing list