You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/08/04 07:56:04 UTC

[GitHub] [hbase] Apache9 commented on a diff in pull request #4678: HBASE-27269 The implementation of TestReplicationStatus.waitOnMetricsReport is incorrect

Apache9 commented on code in PR #4678:
URL: https://github.com/apache/hbase/pull/4678#discussion_r937465581


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStatus.java:
##########
@@ -139,6 +139,7 @@ private List<ReplicationLoadSource> waitOnMetricsReport(int greaterThan, ServerN
       metrics.getLiveServerMetrics().get(serverName).getReplicationLoadSourceList();
     while (list.size() <= greaterThan) {
       Threads.sleep(1000);
+      list = metrics.getLiveServerMetrics().get(serverName).getReplicationLoadSourceList();

Review Comment:
   This is still incorrect...
   
   We need to call hbaseAdmin.getClusterMetrics every time when checking...
   
   And here we'd better use the waitFor method to limit the max wait time?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

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