helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject helix git commit: Fix broken TestWorkflowTermination
Date Tue, 24 Apr 2018 19:55:41 GMT
Repository: helix
Updated Branches:
  refs/heads/master d2fb22d1f -> 5c49de3c8


Fix broken TestWorkflowTermination


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/5c49de3c
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/5c49de3c
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/5c49de3c

Branch: refs/heads/master
Commit: 5c49de3c8532f53a126189d8e7d3d89f85ae3b2b
Parents: d2fb22d
Author: Harry Zhang <zhan849@usc.edu>
Authored: Tue Apr 24 12:47:28 2018 -0700
Committer: Harry Zhang <zhan849@usc.edu>
Committed: Tue Apr 24 12:52:59 2018 -0700

----------------------------------------------------------------------
 .../helix/integration/task/TestWorkflowTermination.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/5c49de3c/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowTermination.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowTermination.java
b/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowTermination.java
index 9e3e880..2da3e2f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowTermination.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowTermination.java
@@ -113,12 +113,11 @@ public class TestWorkflowTermination extends TaskTestBase {
     _driver.pollForWorkflowState(workflowName, 10000L, TaskState.TIMED_OUT);
 
     // Running job should be marked as timeout
-    // and job not started should be marked as NOT_STARTED
+    // and job not started should not appear in workflow context
     _driver.pollForJobState(workflowName, getJobNameToPoll(workflowName, JOB_NAME), 10000L,
TaskState.TIMED_OUT);
-    _driver.pollForJobState(workflowName, getJobNameToPoll(workflowName, notStartedJobName),
10000L,
-        TaskState.NOT_STARTED);
 
     WorkflowContext context = _driver.getWorkflowContext(workflowName);
+    Assert.assertNull(context.getJobState(notStartedJobName));
     Assert.assertTrue(context.getFinishTime() - context.getStartTime() >= timeout);
 
     Thread.sleep(workflowExpiry + 200);
@@ -159,12 +158,12 @@ public class TestWorkflowTermination extends TaskTestBase {
 
     _driver.pollForJobState(workflowName, getJobNameToPoll(workflowName, JOB_NAME), 10000L,
         TaskState.STOPPED);
-    _driver.pollForJobState(workflowName, getJobNameToPoll(workflowName, notStartedJobName),
10000L,
-        TaskState.NOT_STARTED);
+    WorkflowContext context = _driver.getWorkflowContext(workflowName);
+    Assert.assertNull(context.getJobState(notStartedJobName));
 
     _driver.pollForWorkflowState(workflowName, 10000L, TaskState.TIMED_OUT);
 
-    WorkflowContext context = _driver.getWorkflowContext(workflowName);
+    context = _driver.getWorkflowContext(workflowName);
     Assert.assertTrue(context.getFinishTime() - context.getStartTime() >= timeout);
 
     Thread.sleep(workflowExpiry + 200);


Mime
View raw message