cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r409932 - /cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java
Date Sun, 28 May 2006 06:49:16 GMT
Author: antonio
Date: Sat May 27 23:49:15 2006
New Revision: 409932

URL: http://svn.apache.org/viewvc?rev=409932&view=rev
Log:
Make sure we wait more than 4 sec for every script rewrite. If not the case fails randomly.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java

Modified: cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java?rev=409932&r1=409931&r2=409932&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java
Sat May 27 23:49:15 2006
@@ -27,13 +27,19 @@
     final String flowscriptPath = "samples/flow/test/sendpage.js";
     final String paramToken = "@REPLACEME@";
     final String resultXPath = "html/body/p[1]";
+    
+    protected void copyWebappFile(String filename, String param, String value) throws Exception
{
+        super.copyWebappFile(filename, param, value);
+        // AG: Default javacript check-reload time in cocoon.xconf is 4 seconds
+        // Let's wait 1 ms more, 4001 ms seems to be ok. 
+        Thread.sleep(4001);
+    }
 
     public void testFlowscriptReload()
         throws Exception
     {
         // Copy the flowscript from its source directory to the destination
         // area, and replace the parameter value with 'abc' 
-
         final String expected1 = "replaceme-abc";
         copyWebappFile(flowscriptPath, paramToken, expected1);
         loadHtmlPage(pageurl+"showString");
@@ -42,13 +48,8 @@
 
         // Copy the flowscript from its source directory to the destination
         // area, and replace the parameter value with '123' 
-
         final String expected2 = "replaceme-123";
         copyWebappFile(flowscriptPath, paramToken, expected2);
-        // AG: Default javacript check-reload time in cocoon.xconf is 4 seconds
-        // Let's wait 1 ms more, 4001 ms seems to be ok. 
-        Thread.sleep(4001);
-
         loadHtmlPage(pageurl+"showString");
         String result2 = evalXPath(resultXPath);
         assertEquals("After flowscript was modified", expected2, result2);



Mime
View raw message