You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2006/05/28 08:49:16 UTC
svn commit: r409932 -
/cocoon/branches/BRANCH_2_1_X/src/test/htmlunit/org/apache/cocoon/FlowscriptReloadTestCase.java
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);