infraio commented on a change in pull request #1738:
URL: https://github.com/apache/hbase/pull/1738#discussion_r427713218



##########
File path: 
hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupUtil.java
##########
@@ -57,39 +68,40 @@ public static void setUp() throws Exception {
       RSGroupAdminEndpoint.class.getName());
     UTIL.startMiniCluster(5);
     master = UTIL.getMiniHBaseCluster().getMaster();
-    admin = UTIL.getAdmin();
-    rsGroupAdminClient = new RSGroupAdminClient(UTIL.getConnection());
 
-    HRegionServer rs = UTIL.getHBaseCluster().getRegionServer(0);
-    rsGroupAdminClient.addRSGroup(GROUP_NAME);
-    
rsGroupAdminClient.moveServers(Collections.singleton(rs.getServerName().getAddress()),
 GROUP_NAME);
-    admin.createNamespace(NamespaceDescriptor.create(NAMESPACE_NAME)
-      .addConfiguration(RSGroupInfo.NAMESPACE_DESC_PROP_GROUP, GROUP_NAME)
-      .build());
+    UTIL.waitFor(60000, (Predicate<Exception>) () ->
+        master.isInitialized() && ((RSGroupBasedLoadBalancer) 
master.getLoadBalancer()).isOnline());
 
-    rsGroupInfoManager = RSGroupInfoManagerImpl.getInstance(master);
-    rsGroupInfoManager.start();
+    rsGroupAdminClient = new RSGroupAdminClient(UTIL.getConnection());
+
+    List<RSGroupAdminEndpoint> cps =
+        
master.getMasterCoprocessorHost().findCoprocessors(RSGroupAdminEndpoint.class);
+    assertTrue(cps.size() > 0);
+    rsGroupInfoManager = cps.get(0).getGroupInfoManager();
   }
 
   @AfterClass
-  public static void tearDown() throws IOException {
-    admin.deleteNamespace(NAMESPACE_NAME);

Review comment:
       Why this removed?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to