Skip to content

Commit e069a06

Browse files
authored
HDFS-14742. RBF: TestRouterFaultTolerant tests are flaky
1 parent 1fdfaeb commit e069a06

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/FederationTestUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,10 @@ public static RouterClient getAdminClient(
474474

475475
/**
476476
* Add a mount table entry in some name services and wait until it is
477-
* available.
477+
* available. If there are multiple routers,
478+
* {@link #createMountTableEntry(List, String, DestinationOrder, Collection)}
479+
* should be used instead because the method does not refresh
480+
* the mount tables of the other routers.
478481
* @param router Router to change.
479482
* @param mountPoint Name of the mount point.
480483
* @param order Order of the mount table entry.

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterFaultTolerant.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ private void testWriteWithFailedSubcluster(final DestinationOrder order)
248248
LOG.info("Setup {} with order {}", mountPoint, order);
249249
createMountTableEntry(
250250
getRandomRouter(), mountPoint, order, namenodes.keySet());
251+
refreshRoutersCaches(routers);
251252

252253
LOG.info("Write in {} should succeed writing in ns0 and fail for ns1",
253254
mountPath);

0 commit comments

Comments
 (0)