You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/11/26 00:32:04 UTC

svn commit: r1545456 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java

Author: markt
Date: Mon Nov 25 23:32:03 2013
New Revision: 1545456

URL: http://svn.apache.org/r1545456
Log:
Backport automatic deployment changes part 18
Fix test failures when the file timestamp hadn't moved far enough for the OS to report it as changed.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1484959

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java?rev=1545456&r1=1545455&r2=1545456&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestHostConfigAutomaticDeployment.java Mon Nov 25 23:32:03 2013
@@ -1115,34 +1115,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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org