[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: File last modified diff behavior

alesj do-not-reply at jboss.com
Tue Apr 14 07:54:17 EDT 2009


"jaikiran" wrote : Yep, i have Kubuntu system where this still fails:
  | 
Yeah, for me too.

"jaikiran" wrote : 
  | The delay that we need, should be between the change of the original file and  copying to temp file. Something like:
  | 
  | 
  |   | 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?

Although, the temp should be compiled/copied to test-classes long before System.currentTimemillis - 1sec.
As mvn first creates all the files and only then runs the tests.

Checker then deletes and re-creates the temp file,
resulting in new last modified.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225339#4225339

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225339



More information about the jboss-dev-forums mailing list