echonesis commented on code in PR #10591:
URL: https://github.com/apache/ozone/pull/10591#discussion_r3465587389
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAFollowerReadWithAllRunning.java:
##########
@@ -571,4 +574,40 @@ void testClientWithLocalLeaseEnabled() throws Exception {
IOUtils.closeQuietly(ozoneClient);
}
}
+
+ @Test
+ void testGrpcClientFollowerReadTargetsFollower() throws Exception {
+ OzoneConfiguration clientConf = new OzoneConfiguration(getConf());
+ clientConf.setBoolean(OZONE_CLIENT_FOLLOWER_READ_ENABLED_KEY, true);
+ clientConf.set(OZONE_CLIENT_FOLLOWER_READ_DEFAULT_CONSISTENCY_KEY,
"LOCAL_LEASE");
+ clientConf.set(OZONE_OM_TRANSPORT_CLASS,
GrpcOmTransportFactory.class.getName());
Review Comment:
Thanks @ivandika3
Yes, parameterizing this test over `OZONE_OM_TRANSPORT_CLASS` looks feasible
if we keep the scope at the test-method level.
The cluster is already started with follower read enabled, and the
follower-read setup also enables the gRPC OM server, so we do not need to
rebuild the cluster per transport. I can create a fresh client inside the test
with `OZONE_OM_TRANSPORT_CLASS` set to either `Hadoop3OmTransportFactory` or
`GrpcOmTransportFactory`, then run the same read path for both.
I would avoid parameterizing the whole test class because many existing
tests use the shared client/objectStore initialized in `@BeforeAll` and some of
them assert Hadoop RPC proxy-provider internals. That would require a broader
lifecycle refactor and would make unrelated tests run twice.
--
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]