HDFS-14742. RBF: TestRouterFaultTolerant tests are flaky

(cherry picked from commit e069a06137)
This commit is contained in:
Akira Ajisaka 2020-04-21 00:41:18 +09:00
parent 0982f56f3a
commit 5459dd64fd
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
2 changed files with 5 additions and 1 deletions

View File

@ -474,7 +474,10 @@ public static RouterClient getAdminClient(
/** /**
* Add a mount table entry in some name services and wait until it is * Add a mount table entry in some name services and wait until it is
* available. * available. If there are multiple routers,
* {@link #createMountTableEntry(List, String, DestinationOrder, Collection)}
* should be used instead because the method does not refresh
* the mount tables of the other routers.
* @param router Router to change. * @param router Router to change.
* @param mountPoint Name of the mount point. * @param mountPoint Name of the mount point.
* @param order Order of the mount table entry. * @param order Order of the mount table entry.

View File

@ -248,6 +248,7 @@ private void testWriteWithFailedSubcluster(final DestinationOrder order)
LOG.info("Setup {} with order {}", mountPoint, order); LOG.info("Setup {} with order {}", mountPoint, order);
createMountTableEntry( createMountTableEntry(
getRandomRouter(), mountPoint, order, namenodes.keySet()); getRandomRouter(), mountPoint, order, namenodes.keySet());
refreshRoutersCaches(routers);
LOG.info("Write in {} should succeed writing in ns0 and fail for ns1", LOG.info("Write in {} should succeed writing in ns0 and fail for ns1",
mountPath); mountPath);