From 0f32c6753489a1901b9c7091039187712592ce1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:10:59 +0200 Subject: [PATCH] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 11.0.0 (#1146) * Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 11.0.0 Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 11.0.0. --- updated-dependencies: - dependency-name: org.apache.tomcat.embed:tomcat-embed-core dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix tomcat Signed-off-by: Gregor Zeitlinger --------- Signed-off-by: dependabot[bot] Signed-off-by: Gregor Zeitlinger Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger --- .../example-greeting-service/pom.xml | 2 +- .../example-hello-world-app/pom.xml | 2 +- examples/example-exporter-servlet-tomcat/pom.xml | 2 +- .../it-exporter-servlet-tomcat-sample/pom.xml | 2 +- .../metrics/it/exporter/test/ExporterIT.java | 10 +++++++++- .../prometheus/metrics/it/exporter/test/TomcatIT.java | 7 +++++++ 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/examples/example-exemplars-tail-sampling/example-greeting-service/pom.xml b/examples/example-exemplars-tail-sampling/example-greeting-service/pom.xml index fd0750e6e..f0d2a6a46 100644 --- a/examples/example-exemplars-tail-sampling/example-greeting-service/pom.xml +++ b/examples/example-exemplars-tail-sampling/example-greeting-service/pom.xml @@ -38,7 +38,7 @@ org.apache.tomcat.embed tomcat-embed-core - 10.1.30 + 11.0.0 diff --git a/examples/example-exemplars-tail-sampling/example-hello-world-app/pom.xml b/examples/example-exemplars-tail-sampling/example-hello-world-app/pom.xml index 3e51aee99..299cb7656 100644 --- a/examples/example-exemplars-tail-sampling/example-hello-world-app/pom.xml +++ b/examples/example-exemplars-tail-sampling/example-hello-world-app/pom.xml @@ -38,7 +38,7 @@ org.apache.tomcat.embed tomcat-embed-core - 10.1.30 + 11.0.0 diff --git a/examples/example-exporter-servlet-tomcat/pom.xml b/examples/example-exporter-servlet-tomcat/pom.xml index 81b81aa15..f41ba92f4 100644 --- a/examples/example-exporter-servlet-tomcat/pom.xml +++ b/examples/example-exporter-servlet-tomcat/pom.xml @@ -38,7 +38,7 @@ org.apache.tomcat.embed tomcat-embed-core - 10.1.30 + 11.0.0 diff --git a/integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xml b/integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xml index 67b6fa0c3..8cb9faa81 100644 --- a/integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xml +++ b/integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xml @@ -33,7 +33,7 @@ org.apache.tomcat.embed tomcat-embed-core - 10.1.30 + 11.0.0 diff --git a/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.java b/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.java index 3e0caf954..852b7cd0d 100644 --- a/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.java +++ b/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.java @@ -176,6 +176,10 @@ public void testErrorHandling() throws IOException { assertThat(new String(response.body, UTF_8)).contains("Simulating an error."); } + protected boolean headReturnsContentLength() { + return true; + } + @Test public void testHeadRequest() throws IOException { sampleAppContainer @@ -186,7 +190,11 @@ public void testHeadRequest() throws IOException { assertThat(size > 0).isTrue(); Response headResponse = scrape("HEAD", ""); assertThat(headResponse.status).isEqualTo(200); - assertThat(headResponse.getHeader("Content-Length")).isEqualTo(Integer.toString(size)); + if (headReturnsContentLength()) { + assertThat(headResponse.getHeader("Content-Length")).isEqualTo(Integer.toString(size)); + } else { + assertThat(headResponse.getHeader("Content-Length")).isNull(); + } assertThat(headResponse.body.length).isZero(); } diff --git a/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/TomcatIT.java b/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/TomcatIT.java index ea5e6b69d..731e7fa3a 100644 --- a/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/TomcatIT.java +++ b/integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/TomcatIT.java @@ -7,4 +7,11 @@ class TomcatIT extends ExporterIT { public TomcatIT() throws IOException, URISyntaxException { super("exporter-servlet-tomcat-sample"); } + + @Override + protected boolean headReturnsContentLength() { + // not any more since + // https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.0-M3_(markt) + return false; + } }