You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/07/02 18:00:36 UTC
[07/26] git commit: SLIDER-159: jenkins testEcho intermittently
failing
SLIDER-159: jenkins testEcho intermittently failing
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/9a54a0b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/9a54a0b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/9a54a0b8
Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it
Commit: 9a54a0b8d3e6d5f5f706407dfe4ba432419b90d2
Parents: 8fe71f0
Author: Steve Loughran <st...@apache.org>
Authored: Tue Jul 1 16:19:58 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Tue Jul 1 16:19:58 2014 +0100
----------------------------------------------------------------------
.../services/workflow/ForkedProcessService.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9a54a0b8/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
index 7e73005..ee68aa4 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
@@ -281,12 +281,15 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem
}
long start = System.currentTimeMillis();
while (System.currentTimeMillis() - start <= duration) {
- if (finalOutput && process.isFinalOutputProcessed()) {
- //end of stream, break
- break;
- }
- if (!process.isRecentOutputEmpty()) {
+ boolean finished;
+ if (finalOutput) {
+ // final flag means block until all data is done
+ finished = process.isFinalOutputProcessed();
+ } else {
// there is some output
+ finished = !process.isRecentOutputEmpty();
+ }
+ if (finished) {
break;
}
try {
@@ -299,5 +302,4 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem
return process.getRecentOutput();
}
-
}