Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Class CPAN distribution.

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 31382
Status: resolved
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: alexp [...] transitive.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Test Improvement: File::Temp
Date: Tue, 11 Dec 2007 13:23:06 +0000
To: bug-Path-Class [...] rt.cpan.org
From: Alex Page <alexp [...] transitive.com>
With Path::Class 0.16, the tests in t/03-filesystem.t include one which uses $file->stat and checks the modification date. $file has been created in the test directory for the build. When this build directory is on another machine (in my example, because $HOME is NFS-mounted), it's possible for there to be a >20 second discrepancy between the modification time recorded by the fileserver and retrieved by stat, and the time the build system thinks it modified the file. There are two possible solutions to this. The first is to create the file, wait for some number of seconds, touch it and then stat it. The test could check the difference between the created and modified times returned by $file->stat. The other would be to create the file in the system's temporary file directory (using File::Temp?). This is much more likely to be local to the system than the build directory. Of course, the third solution is to actually get the clocks in sync between the fileserver and build system, which was my eventual workaround. But not everybody will have that option, so reducing the false negative rate of this test would be good :) Alex -- Alex Page, Release Engineer, Transitive Limited Maybrook House, 40 Blackfriars Street, Manchester M3 2EG, UK Web: http://www.transitive.com/ | Phone: (+44) 161-214-0406
Hi Alex, Thanks for the suggestion, I've made the change for the next release. -Ken