mladjan-gadzic commented on code in PR #4695:
URL: https://github.com/apache/ozone/pull/4695#discussion_r1191321167
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -76,7 +81,7 @@ public class OmRatisSnapshotProvider extends
RDBSnapshotProvider {
private final Map<String, OMNodeDetails> peerNodesMap;
private final HttpConfig.Policy httpPolicy;
private final boolean spnegoEnabled;
- private final URLConnectionFactory connectionFactory;
+ private URLConnectionFactory connectionFactory;
Review Comment:
Unfortunately I could not find any other way. I need to mock
`connectionFactory` field which is not a part of constructor parameters. I
tried using `@Mock`/`@IncjectMock` combination, `Reflection` and `Unsafe`, but
without results. Another idea would be to create constructor specificly for
testing purposes, but I do not like that approach.
Do you have an idea how this could be handled?
--
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]