Skip to content

Commit

Permalink
3.x backport stray fixes (#59)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
barchetta and tjquinno authored Jul 8, 2024
1 parent d14c346 commit 34fb211
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion etc/scripts/updatehelidonversion.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 34fb211

Please sign in to comment.