diff options
author | Morten Tokle <mortent@verizonmedia.com> | 2020-08-12 13:43:28 +0200 |
---|---|---|
committer | Morten Tokle <mortent@verizonmedia.com> | 2020-08-12 13:43:28 +0200 |
commit | fd148dede2fdc63bf399f0f601041f0dac483184 (patch) | |
tree | 70a41e76a3924fdc4ce05c08c3857d45471f0691 /jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty | |
parent | 104f7547cb92ab39251308f15ddc45d515a48ae2 (diff) |
Report requests to /search as request type read
Diffstat (limited to 'jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty')
-rw-r--r-- | jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java index e06905a0212..1a8aa23668b 100644 --- a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java +++ b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java @@ -36,7 +36,8 @@ import static org.hamcrest.Matchers.equalTo; public class HttpResponseStatisticsCollectorTest { private Connector connector; private List<String> monitoringPaths = List.of("/status.html"); - private HttpResponseStatisticsCollector collector = new HttpResponseStatisticsCollector(monitoringPaths); + private List<String> searchPaths = List.of("/search"); + private HttpResponseStatisticsCollector collector = new HttpResponseStatisticsCollector(monitoringPaths, searchPaths); private int httpResponseCode = 500; @Test @@ -102,12 +103,14 @@ public class HttpResponseStatisticsCollectorTest { @Test public void statistics_include_request_type_dimension() throws Exception { testRequest("http", 200, "GET", "/search"); + testRequest("http", 200, "POST", "/search"); testRequest("http", 200, "POST", "/feed"); testRequest("http", 200, "GET", "/status.html?foo=bar"); var stats = collector.takeStatistics(); assertStatisticsEntryWithRequestTypePresent(stats, "http", "GET", Metrics.RESPONSES_2XX, "monitoring", 1L); assertStatisticsEntryWithRequestTypePresent(stats, "http", "GET", Metrics.RESPONSES_2XX, "read", 1L); + assertStatisticsEntryWithRequestTypePresent(stats, "http", "POST", Metrics.RESPONSES_2XX, "read", 1L); assertStatisticsEntryWithRequestTypePresent(stats, "http", "POST", Metrics.RESPONSES_2XX, "write", 1L); testRequest("http", 200, "GET"); |