You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/07/02 22:19:03 UTC

git commit: Added test for timeout indicator to allow for negative one

Repository: incubator-streams
Updated Branches:
  refs/heads/master b68828b0f -> 2fc2ba188


Added test for timeout indicator to allow for negative one


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

Branch: refs/heads/master
Commit: 2fc2ba18850f8066041781e20457a3fffae1d430
Parents: b68828b
Author: mfranklin <mf...@apache.org>
Authored: Wed Jul 2 16:18:52 2014 -0400
Committer: mfranklin <mf...@apache.org>
Committed: Wed Jul 2 16:18:52 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/streams/local/tasks/StreamsProviderTask.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/2fc2ba18/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StreamsProviderTask.java
----------------------------------------------------------------------
diff --git a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StreamsProviderTask.java b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StreamsProviderTask.java
index ed95cdd..9156f92 100644
--- a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StreamsProviderTask.java
+++ b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StreamsProviderTask.java
@@ -128,7 +128,8 @@ public class StreamsProviderTask extends BaseStreamsTask implements DatumStatusC
         try {
             this.provider.prepare(this.config); //TODO allow for configuration objects
             StreamsResultSet resultSet = null;
-            long maxZeros = timeout / DEFAULT_SLEEP_TIME_MS;
+            //Negative values mean we want to run forever
+            long maxZeros = timeout < 0 ? -1 : (timeout / DEFAULT_SLEEP_TIME_MS);
             switch(this.type) {
                 case PERPETUAL: {
                     provider.startStream();