streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reba...@apache.org
Subject [1/2] incubator-streams git commit: Fixed failing RSS Streams test
Date Fri, 14 Nov 2014 23:33:29 GMT
Repository: incubator-streams
Updated Branches:
  refs/heads/master b410556f8 -> 9b89c0898


Fixed failing RSS Streams test


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

Branch: refs/heads/master
Commit: a698a077936f187e419f9caaaf024c3c50975ae5
Parents: 76763f8
Author: Ryan Ebanks <ryanebanks@gmail.com>
Authored: Thu Nov 13 08:48:03 2014 -0600
Committer: Ryan Ebanks <ryanebanks@gmail.com>
Committed: Thu Nov 13 08:48:03 2014 -0600

----------------------------------------------------------------------
 .../org/apache/streams/rss/provider/RssStreamProviderTest.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/a698a077/streams-contrib/streams-provider-rss/src/test/java/org/apache/streams/rss/provider/RssStreamProviderTest.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-rss/src/test/java/org/apache/streams/rss/provider/RssStreamProviderTest.java
b/streams-contrib/streams-provider-rss/src/test/java/org/apache/streams/rss/provider/RssStreamProviderTest.java
index bf5e105..1cce391 100644
--- a/streams-contrib/streams-provider-rss/src/test/java/org/apache/streams/rss/provider/RssStreamProviderTest.java
+++ b/streams-contrib/streams-provider-rss/src/test/java/org/apache/streams/rss/provider/RssStreamProviderTest.java
@@ -52,11 +52,15 @@ public class RssStreamProviderTest extends RandomizedTest {
             StreamsResultSet batch = provider.readCurrent();
             LOGGER.debug("Batch size : {}", batch.size());
             datumCount += batch.size();
+            if(batch.size() != 0) { //if race condition happened, pull again
+                batch = provider.readCurrent();
+                assertEquals(0, batch.size());
+            }
 
             assertTrue(provider.scheduler.isComplete());
+            assertEquals(20, datumCount);
             assertFalse(provider.isRunning());
             assertEquals(0, datums.size());
-            assertEquals(20, datumCount);
             provider.cleanUp();
         } finally {
             if(provider != null)


Mime
View raw message