And another better tidbit... the test that has the self halt is not related in 
any way to the test that is causing the transcript error message to show up... 

For some reason the error message (from a different test) shows up in the 
transcript when I run the test that has the self halt in it ... I haven't 
figured out why the messages to the Transcript are somehow deferred or why the 
code that triggers the real error gets run while running a different test but 
now that I have figured out that the apparent correlation between the test that 
I was running and the message showing up in the transcript is bogus, I can get 
on with tracking down the real problem in the test (that isn't failing), but 
introducing the error into the system...

The test that introduces the error itself isn't failing, but it is creating a 
repository that is generating the error, so the deferred message may be 
triggered if the repo gets stuck in a cache somewhere that gets scanned  while 
running a different test --- at least that's my current hypothesis. 

Sorry for the interruption:( 

Dale

----- Original Message -----
| From: "Dale K. Henrichs" <[email protected]>
| To: "Pharo Development List" <[email protected]>
| Sent: Sunday, July 7, 2013 9:16:39 PM
| Subject: Re: [Pharo-dev] Pharo2.0 unti test oddity
| 
| One more tidbit. This code brings up a debugger:
| 
|  testWrite
|   self halt.
|   [     | packageName version versionInfo |
|     #('CCC') do: [ :pn | self deny: (self hasPackage: pn) ].
|     packageName := 'CCC'.
|     Gofer new
|         disablePackageCache;
|         repository: (self getTestRepository: 'issue33');
|         package: packageName;
|         load.
|     self validateTimestamp: 'dkh 11/2/1954 16:15'.
|     #('CCC')
|         do: [ :pn |
|             versionInfo := (MCWorkingCopy allManagers detect: [ :wc |
|             wc packageName = pn ]) ancestors first.
|             version := (self getTestRepository: 'issue33')
|             versionWithInfo: versionInfo.
|             (self getTestRepository: 'empty') storeVersion: version
|             ]] on:Error do:[:ex | self halt. Transcript cr; show: ex
|             description. ex pass]
| 
| So perhaps the issue I've seeing is related to a triggering a halt in
| an error handler ... Cami did your test trigger an error and print
| to the Transcript... I think that bad behavior is in the latest
| github checkin and the tests were passing until that checkin ...
| 
| Dale
| ----- Original Message -----
| | From: "Dale K. Henrichs" <[email protected]>
| | To: "Pharo Development List" <[email protected]>
| | Sent: Sunday, July 7, 2013 9:11:46 PM
| | Subject: Re: [Pharo-dev] Pharo2.0 unti test oddity
| | 
| | Cami,
| | 
| | I thought maybe you'd tell me that I shouldn't be using halt or
| | that
| | the TestRunner is obsolete or something:)
| | 
| | Actually I'm not surprised that you can find an image where that
| | code
| | works, the problem is that I've been able to hook up with an image
| | where it doesn't work:(
| | 
| | Look, tests failed in travis so I downloaded the Pharo2.0-portable
| | (Pharo2.0-20610 and the timestamps on most of the files is July 3
| | at
| | 5:40 am ... the timestamps on the files in the Mac directory are
| | March 13 at 10:31am) and I'm running on a 10.6.8 Mac.
| | 
| | I don't know how you've built your image, but the one that I'm
| | using
| | has loaded the latest code from the pharo2.0 branch on github
| | (71f4216bffee0e5a998ec903cb6ffb6d838db0ce) including Thierry
| | Goubier's git repository code, which brings in OsProcess ... as I
| | said I'm trying to locally reproduce test issues that showed up on
| | Travis ...
| | 
| | ...  and I've run out of time to monkey with this anymore this
| | evening:)
| | 
| | 
| | Dale
| | 
| | ----- Original Message -----
| | | From: "Camillo Bruni" <[email protected]>
| | | To: "Pharo Development List" <[email protected]>
| | | Sent: Sunday, July 7, 2013 7:57:47 PM
| | | Subject: Re: [Pharo-dev] Pharo2.0 unti test oddity
| | | 
| | | It's hard to guess without an image...
| | | I took the one from here
| | | 
https://ci.inria.fr/pharo-contribution/job/FileTree/PHARO=20,VERSION=stable,VM=vm/
| | | is that more or less the same as what you have?
| | | 
| | | When I copy paste your code it works as expected and opens the
| | | debugger on halt.
| | | Which VM?
| | | Which OS?
| | | 
| | | On 2013-07-08, at 04:35, "Dale K. Henrichs"
| | | <[email protected]> wrote:
| | | 
| | | > I'm running this test in Pharo2.0 using TestRunner. Can someone
| | | > explain to me why this test would PASS while:
| | | > 
| | | >  - the debugger is not brought up
| | | >  - the description of the exception _is_ displayed in the
| | | >  transcript
| | | > 
| | | >    Error reading repository properties (.filetree):
| | | >    
/Users/dhenrich/Pharo2.0/Pharo2.0-portable.app/Contents/Resources/temp/repo
| | | >    :: Error: end of input expected
| | | > 
| | | > 
| | | > Here's the test method:
| | | > 
| | | >  testWrite
| | | >  [
| | | >    | packageName version versionInfo |
| | | >    #('CCC') do: [ :pn | self deny: (self hasPackage: pn) ].
| | | >    packageName := 'CCC'.
| | | >    Gofer new
| | | >        disablePackageCache;
| | | >        repository: (self getTestRepository: 'issue33');
| | | >        package: packageName;
| | | >        load.
| | | >    self validateTimestamp: 'dkh 11/2/1954 16:15'.
| | | >    #('CCC')
| | | >        do: [ :pn |
| | | >            versionInfo := (MCWorkingCopy allManagers detect: [
| | | >            :wc
| | | >            | wc packageName = pn ]) ancestors first.
| | | >            version := (self getTestRepository: 'issue33')
| | | >            versionWithInfo: versionInfo.
| | | >            (self getTestRepository: 'empty') storeVersion:
| | | >            version
| | | >            ]
| | | >  ]
| | | >    on: Error
| | | >    do:
| | | >      [:ex |
| | | >        self halt.
| | | >        Transcript cr; show: ex description.
| | | >        ex pass]
| | | > 
| | | > The test passes with flying colors if I run it from a workspace
| | | > as
| | | > well:
| | | > 
| | | >  MCFileTreeIssue33Test debug: #testWrite
| | | > 
| | | > I'd kinda like to debug this test failure:(
| | | > 
| | | > Using Pharo2.0-20610 from Pharo2.0-portable download (in the
| | | > last
| | | > day or two).
| | | > 
| | | > Dale
| | | > 
| | | 
| | | 
| | | 
| | 
| 

Reply via email to