You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2020/12/07 23:57:42 UTC

[helix] branch master updated: fix test Helix-rest testAddConfigFields (#1560)

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


The following commit(s) were added to refs/heads/master by this push:
     new c4c9304  fix test Helix-rest testAddConfigFields (#1560)
c4c9304 is described below

commit c4c930421b8c0c077c1612ace98f60fe60118136
Author: xyuanlu <xy...@gmail.com>
AuthorDate: Mon Dec 7 15:57:30 2020 -0800

    fix test Helix-rest testAddConfigFields (#1560)
    
    Fix test Helix-rest testAddConfigFields
---
 .../test/java/org/apache/helix/rest/server/TestClusterAccessor.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java b/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
index 62cc1ef..f73738f 100644
--- a/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
+++ b/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
@@ -224,7 +224,8 @@ public class TestClusterAccessor extends AbstractTestClass {
   @Test(dependsOnMethods = "testGetClusterTopologyAndFaultZoneMap")
   public void testAddConfigFields() throws IOException {
     System.out.println("Start test :" + TestHelper.getTestMethodName());
-    String cluster = _clusters.iterator().next();
+    //Need to use TestCluster_1 here since other test may add unwanted key to listField. issue-1336
+    String cluster = "TestCluster_1";
     ClusterConfig oldConfig = getClusterConfigFromRest(cluster);
 
     ClusterConfig configDelta = new ClusterConfig(cluster);
@@ -249,7 +250,7 @@ public class TestClusterAccessor extends AbstractTestClass {
   @Test(dependsOnMethods = "testAddConfigFields")
   public void testUpdateConfigFields() throws IOException {
     System.out.println("Start test :" + TestHelper.getTestMethodName());
-    String cluster = _clusters.iterator().next();
+    String cluster = "TestCluster_1";
     ClusterConfig config = getClusterConfigFromRest(cluster);
 
     ZNRecord record = config.getRecord();