NealSun96 commented on a change in pull request #788: Implement request
forwarding for ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/788#discussion_r384708920
##########
File path:
helix-rest/src/test/java/org/apache/helix/rest/metadatastore/accessor/TestZkRoutingDataWriter.java
##########
@@ -40,15 +41,35 @@
private static final String DUMMY_SHARDING_KEY = "SHARDING_KEY";
private MetadataStoreRoutingDataWriter _zkRoutingDataWriter;
+ // MockWriter is used for testing request forwarding features in non-leader
situations
+ class MockWriter extends ZkRoutingDataWriter {
+ HttpUriRequest calledRequest;
+
+ MockWriter(String namespace, String zkAddress) {
+ super(namespace, zkAddress);
+ }
+
+ // This method does not call super() because the http call should not be
actually made
+ @Override
Review comment:
I think you got the wrong file. :)
The `MockZkRoutingDataWriter` for integration testing is in
`MockMetadataStoreDirectoryAccessor.java`, and that's where the actual HTTP
calls are made to the leader. This file is for unit-testing, where only the
forwarding logic is tested.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]