rzo1 commented on code in PR #2170:
URL: https://github.com/apache/stormcrawler/pull/2170#discussion_r4053779316


##########
core/src/test/java/org/apache/stormcrawler/bolt/AbstractFetcherBoltTest.java:
##########
@@ -192,6 +193,30 @@ void 
invalidProxyMetadataEmitsFetchError(WireMockRuntimeInfo wmRuntimeInfo)
         Assertions.assertEquals(0, 
output.getEmitted(Utils.DEFAULT_STREAM_ID).size());
     }
 
+    /**
+     * The protocols copy every response header into the response metadata, so 
a header named
+     * metrics.something reaches the loop which feeds the fetcher metric 
registry. A value which is
+     * not a number must not turn a complete fetch into a FETCH_ERROR, see 
issue #2099.
+     */
+    @Test
+    void nonNumericMetricsHeaderDoesNotFailTheFetch(WireMockRuntimeInfo 
wmRuntimeInfo)

Review Comment:
   Added `ProtocolMetricsTest`, which calls `update` directly with a valid and 
an invalid value, so the guard stays covered after #2171.



-- 
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]

Reply via email to