From 34fb211eb77b27cfff5ca768cd54de20e13547fc Mon Sep 17 00:00:00 2001 From: Joe DiPol Date: Mon, 8 Jul 2024 16:43:35 -0700 Subject: [PATCH] 3.x backport stray fixes (#59) * Exclude status example test for status 171 depending on JDK version (#58) * 3.x: Handle TMPDIR not being set (#48) --------- Co-authored-by: Tim Quinn --- etc/scripts/updatehelidonversion.sh | 6 +++++- .../io/helidon/examples/mp/httpstatuscount/StatusTest.java | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/etc/scripts/updatehelidonversion.sh b/etc/scripts/updatehelidonversion.sh index f06d53d8a..573c7d44e 100755 --- a/etc/scripts/updatehelidonversion.sh +++ b/etc/scripts/updatehelidonversion.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2022, 2023 Oracle and/or its affiliates. +# Copyright (c) 2022, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,6 +29,10 @@ if [ -z "${NEW_VERSION}" ]; then exit 1 fi +if [ -z "${TMPDIR}" ]; then + readonly TMPDIR="/tmp" +fi + readonly POM_FILES=$(find . -name pom.xml -print) for f in ${POM_FILES}; do diff --git a/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java b/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java index a124a1d3d..7d1db3321 100644 --- a/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java +++ b/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,10 @@ void findStatusMetrics() { @Test void checkStatusMetrics() { - checkAfterStatus(171); + // intermediate responses are not "full" responses and since JDK 20 they are not returned by the client at all + if (Runtime.version().feature() < 20) { + checkAfterStatus(171); + } checkAfterStatus(200); checkAfterStatus(201); checkAfterStatus(204);