ayushtkn commented on a change in pull request #3745:
URL: https://github.com/apache/hadoop/pull/3745#discussion_r761646273
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRPCMultipleDestinationMountTableResolver.java
##########
@@ -668,14 +674,16 @@ public void testInvokeAtAvailableNs() throws IOException {
// Make one subcluster unavailable.
MiniDFSCluster dfsCluster = cluster.getCluster();
dfsCluster.shutdownNameNode(0);
+ dfsCluster.shutdownNameNode(1);
try {
// Verify that #invokeAtAvailableNs works by calling #getServerDefaults.
RemoteMethod method = new RemoteMethod("getServerDefaults");
FsServerDefaults serverDefaults =
rpcServer.invokeAtAvailableNs(method, FsServerDefaults.class);
assertNotNull(serverDefaults);
Review comment:
I thought of using the NamenodeMetrics, but it doesn't track
getServerDefaults. Second is RBFClientMetrics. It tracks all the invokes for
getServerDefault, irrespective of success and it isn't per namespace as well.
So, in case the invocation order by any chance changes, from ns0->ns1->n2 to
ns0->ns2->ns1 in that case the test will become flaky.
In general without the fix, the getServerDefault call will fail only if 2 NS
is down, so I thought if the call is successful we can conclude things work.
Let me know if you have any ideas around what we can assert
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]