This is an automated email from the ASF dual-hosted git repository.

jxue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git

commit 010d786cc2df1b3e2f4c5c9e1e4c04f77527b2a9
Author: narendly <[email protected]>
AuthorDate: Mon Feb 25 18:06:41 2019 -0800

    [HELIX-799] TEST: Fix TestTaskRebalancerFailover
    
        This test was unstable in that the job in the JobQueue would never get 
scheduled by the Controller. When you enqueue jobs to JobQueues, you need to 
stop and ensure that the JobQueue is in STOPPED state first. This RB fixes this.
---
 .../org/apache/helix/integration/task/TestTaskRebalancerFailover.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
 
b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
index 53c961d..01b86ec 100644
--- 
a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
+++ 
b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
@@ -47,6 +47,8 @@ public class TestTaskRebalancerFailover extends TaskTestBase {
     LOG.info("Starting job-queue: " + queueName);
     JobQueue queue = new JobQueue.Builder(queueName).build();
     _driver.createQueue(queue);
+    _driver.stop(queue.getName());
+    _driver.pollForWorkflowState(queueName, TaskState.STOPPED);
 
     // Enqueue jobs
     Set<String> master = Sets.newHashSet("MASTER");
@@ -56,6 +58,7 @@ public class TestTaskRebalancerFailover extends TaskTestBase {
     String job1Name = "masterJob";
     LOG.info("Enqueuing job: " + job1Name);
     _driver.enqueueJob(queueName, job1Name, job);
+    _driver.resume(queue.getName());
 
     // check all tasks completed on MASTER
     String namespacedJob1 = String.format("%s_%s", queueName, job1Name);

Reply via email to