You are viewing a plain text version of this content. The canonical link for it is here.
Posted to s4-commits@incubator.apache.org by mm...@apache.org on 2012/01/31 11:59:33 UTC

[1/4] git commit: minor fix for regression tests - wait for results file to be available

Updated Branches:
  refs/heads/dev 45efb827d -> dd96e8794


minor fix for regression tests
- wait for results file to be available


Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/dd96e879
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/dd96e879
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/dd96e879

Branch: refs/heads/dev
Commit: dd96e8794820ebe29c750641b2c6cbcbd294193f
Parents: bac25cb
Author: Matthieu Morel <mm...@apache.org>
Authored: Tue Jan 31 12:52:41 2012 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Tue Jan 31 12:52:41 2012 +0100

----------------------------------------------------------------------
 .../apache/s4/ft/wordcount/FTWordCountTest.java    |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/dd96e879/s4-core/src/test/java/org/apache/s4/ft/wordcount/FTWordCountTest.java
----------------------------------------------------------------------
diff --git a/s4-core/src/test/java/org/apache/s4/ft/wordcount/FTWordCountTest.java b/s4-core/src/test/java/org/apache/s4/ft/wordcount/FTWordCountTest.java
index 37a68d1..f3c0f55 100644
--- a/s4-core/src/test/java/org/apache/s4/ft/wordcount/FTWordCountTest.java
+++ b/s4-core/src/test/java/org/apache/s4/ft/wordcount/FTWordCountTest.java
@@ -151,6 +151,12 @@ public class FTWordCountTest extends S4TestCase {
         signalTextProcessed.await(10, TimeUnit.SECONDS);
         File results = new File(S4TestCase.DEFAULT_TEST_OUTPUT_DIR
                 + File.separator + "wordcount");
+        if (!results.exists()) {
+        	// in case the results file isn't ready yet
+        	Thread.sleep(1000);
+        	results = new File(S4TestCase.DEFAULT_TEST_OUTPUT_DIR
+                    + File.separator + "wordcount");
+        }
         String s = TestUtils.readFile(results);
         Assert.assertEquals("be=2;da=2;doobie=5;not=1;or=1;to=2;", s);