[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: File last modified diff behavior
jaikiran
do-not-reply at jboss.com
Tue Apr 14 08:04:50 EDT 2009
"alesj" wrote :
|
| | long tempTimestamp = testJsp.getLastModified();
| | // Platform dependent precision for last modified. Let's wait a minimum of 1 sec
| | Thread.sleep(1500);
| | assertFalse(checker.hasStructureBeenModified(originalRoot));
| | long lastModified = testJsp.getLastModified();
|
| Does this work for you?
|
Yes, it does:
-------------------------------------------------------------------------------
| Test set: org.jboss.test.deployers.vfs.structure.modified.test.SynchModificationTestCase
| -------------------------------------------------------------------------------
| Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.816 sec
|
"alesj" wrote :
| Checker then deletes and re-creates the temp file,
| resulting in new last modified.
|
Right, it's the checker which sets the last modified on the new temp to the current system time and should be atleast 1 second diff from the old temp file's last modified time. That delay, with Thread.sleep achieves this.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225342#4225342
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225342
More information about the jboss-dev-forums
mailing list