bharathv commented on a change in pull request #1388: HBASE-24079 [Flakey
Tests] Misc fixes and debug; fix BindException in…
URL: https://github.com/apache/hbase/pull/1388#discussion_r400558209
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMasterRegistry.java
##########
@@ -103,7 +104,17 @@ private static String generateDummyMastersList(int size) {
@Test public void testRegistryRPCs() throws Exception {
Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
HMaster activeMaster = TEST_UTIL.getHBaseCluster().getMaster();
- for (int numHedgedReqs = 1; numHedgedReqs <=3; numHedgedReqs++) {
+ final int size = activeMaster.getMetaRegionLocationCache().
+ getMetaRegionLocations().get().size();
+ // Add wait on all replicas being assigned before proceeding w/ test.
Failed on occasion
+ // because not all replicas had made it up before test started.
+ TEST_UTIL.waitFor(10000,
+ () -> {
+ try (MasterRegistry registry = new MasterRegistry(conf)) {
+ return registry.getMetaRegionLocations().get().size() >= size;
Review comment:
Found it ..RegionReplicaTestHelper#waitUntilAllMetaReplicasAreReady()..
sorry for the typo..the condition should be something like the above method..(I
also fixed an edge case there to make the check tighter)..
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services