exceptionfactory commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828495675
##########
File path:
nifi-nar-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/test/java/org/apache/nifi/processors/TestISPEnrichIP.java
##########
@@ -252,8 +240,6 @@ public void
whenInetAddressThrowsUnknownHostFlowFileShouldBeSentToNotFound() thr
final Map<String, String> attributes = new HashMap<>();
attributes.put("ip", "somenonexistentdomain.comm");
-
when(InetAddress.getByName("somenonexistentdomain.comm")).thenThrow(UnknownHostException.class);
Review comment:
The purpose of this mock was to ensure that this lookup would always
throw an `UnknownHostException`. Unfortunately, static mocking can be
problematic in some cases. Removing the mock resulted in the expected
exception being thrown.
--
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]