Author: markt
Date: Tue May 21 21:08:25 2013
New Revision: 1484959
URL: http://svn.apache.org/r1484959
Log:
Fix test failures when the file timestamp hadn't moved far enough for the OS to
report it as changed.
Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java
Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java?rev=1484959&r1=1484958&r2=1484959&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java
(original)
+++
tomcat/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java
Tue May 21 21:08:25 2013
@@ -1111,34 +1111,35 @@ public class TestHostConfigAutomaticDepl
tomcat.start();
host.backgroundProcess();
- // Change the specified file
+ // Update the last modified time. Add a few seconds to make sure that
+ // the OS reports a change in modification time.
switch (toModify) {
case XML:
if (xml == null) {
Assert.fail();
} else {
- xml.setLastModified(System.currentTimeMillis());
+ xml.setLastModified(System.currentTimeMillis() + 5000);
}
break;
case EXT:
if (ext == null) {
Assert.fail();
} else {
- ext.setLastModified(System.currentTimeMillis());
+ ext.setLastModified(System.currentTimeMillis() + 5000);
}
break;
case WAR:
if (war == null) {
Assert.fail();
} else {
- war.setLastModified(System.currentTimeMillis());
+ war.setLastModified(System.currentTimeMillis() + 5000);
}
break;
case DIR:
if (dir == null) {
Assert.fail();
} else {
- dir.setLastModified(System.currentTimeMillis());
+ dir.setLastModified(System.currentTimeMillis() + 5000);
}
break;
default:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]