Re: [Codenarc-developer] updated tests for File Mod Dates
Brought to you by:
chrismair
From: Hamlet D. <ham...@ca...> - 2011-03-02 13:32:21
|
It builds and runs fine for me. You could also write the output to a temp file using def f = File.createTempFile f.deleteOnExit() That would also not set the mod time on the file under version control. The risk of rewriting the versioned file is if something goes wrong you will lose any local changes you have made. ----- Original Message ----- > The problem is that this is regenerating an existing file. So without > the > timestamp check, or some similar check, the generation could fail or > generate the wrong file and the test would still pass (because of the > original file). > > I tweaked the timestamp logic in the test. Hopefully that addresses > the > issue. Let me know if you come up with a better way to verify that > aspect of > the test. > > Chris > -----Original Message----- > From: Hamlet DArcy [mailto:ham...@ca...] > Sent: Tuesday, March 01, 2011 2:42 AM > To: cod...@li... > Subject: [Codenarc-developer] updated tests for File Mod Dates > > Hi Chris, > > You checked in two tests that compared modification dates on files to > the > current time. Those tests failed on Linux because the File timestamp > is > rounded to the second, which put the file mod date slightly before > the test > start time. Anyway, I just deleted the assertion. It's safe to assume > that > the file system works, I think. > > -- > Hamlet D'Arcy > ham...@ca... > > > ---------------------------------------------------------------------------- > -- > Free Software Download: Index, Search & Analyze Logs and other IT > data in > Real-Time with Splunk. Collect, index and harness all the fast moving > IT > data generated by your applications, servers and devices whether > physical, > virtual or in the cloud. Deliver compliance at lower cost and gain > new > business insights. http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > > > ------------------------------------------------------------------------------ > Free Software Download: Index, Search & Analyze Logs and other IT > data in > Real-Time with Splunk. Collect, index and harness all the fast moving > IT data > generated by your applications, servers and devices whether physical, > virtual > or in the cloud. Deliver compliance at lower cost and gain new > business > insights. http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > |