Skip to content

Commit b3a91fd

Browse files
committed
Move tests to junit jupiter
Minor libs upgrade: elasticsearch 7.17.4 jackson 2.13.2 jakarta.json-api 2.1.0 parsson 1.1.0 yasson 2.0.4 classgraph 4.8.146 testcontainers 1.17.2
1 parent ba93f8f commit b3a91fd

File tree

6 files changed

+124
-159
lines changed

6 files changed

+124
-159
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ gradle-app.setting
1616
# IntelliJ Idea
1717
.idea
1818
*.iml
19-
out
2019

2120
.ci/output
2221

docs/getting-started/migrate-hlrc.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can use the HLRC version `7.x` with the {java-client} version `8.x`:
2525
--------------------------------------------------
2626
dependencies {
2727
implementation 'co.elastic.clients:elasticsearch-java:{version}'
28-
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.17.3'
28+
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.17.4'
2929
// other dependencies <1>
3030
}
3131
--------------------------------------------------

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919

2020
distributionBase=GRADLE_USER_HOME
2121
distributionPath=wrapper/dists
22-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
22+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
2323
zipStoreBase=GRADLE_USER_HOME
2424
zipStorePath=wrapper/dists

gradlew

Lines changed: 103 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
#
44
# Licensed to Elasticsearch B.V. under one or more contributor
@@ -36,101 +36,67 @@
3636
#
3737

3838
##############################################################################
39-
#
40-
# Gradle start up script for POSIX generated by Gradle.
41-
#
42-
# Important for running:
43-
#
44-
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
45-
# noncompliant, but you have some other compliant shell such as ksh or
46-
# bash, then to run this script, type that shell name before the whole
47-
# command line, like:
48-
#
49-
# ksh Gradle
50-
#
51-
# Busybox and similar reduced shells will NOT work, because this script
52-
# requires all of these POSIX shell features:
53-
# * functions;
54-
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
55-
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
56-
# * compound commands having a testable exit status, especially «case»;
57-
# * various built-in commands including «command», «set», and «ulimit».
58-
#
59-
# Important for patching:
60-
#
61-
# (2) This script targets any POSIX shell, so it avoids extensions provided
62-
# by Bash, Ksh, etc; in particular arrays are avoided.
63-
#
64-
# The "traditional" practice of packing multiple parameters into a
65-
# space-separated string is a well documented source of bugs and security
66-
# problems, so this is (mostly) avoided, by progressively accumulating
67-
# options in "$@", and eventually passing that to Java.
68-
#
69-
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
70-
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
71-
# see the in-line comments for details.
72-
#
73-
# There are tweaks for specific operating systems such as AIX, CygWin,
74-
# Darwin, MinGW, and NonStop.
75-
#
76-
# (3) This script is generated from the Groovy template
77-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
78-
# within the Gradle project.
79-
#
80-
# You can find Gradle at https://github.com/gradle/gradle/.
81-
#
39+
##
40+
## Gradle start up script for UN*X
41+
##
8242
##############################################################################
8343

8444
# Attempt to set APP_HOME
85-
8645
# Resolve links: $0 may be a link
87-
app_path=$0
88-
89-
# Need this for daisy-chained symlinks.
90-
while
91-
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
92-
[ -h "$app_path" ]
93-
do
94-
ls=$( ls -ld "$app_path" )
95-
link=${ls#*' -> '}
96-
case $link in #(
97-
/*) app_path=$link ;; #(
98-
*) app_path=$APP_HOME$link ;;
99-
esac
46+
PRG="$0"
47+
# Need this for relative symlinks.
48+
while [ -h "$PRG" ] ; do
49+
ls=`ls -ld "$PRG"`
50+
link=`expr "$ls" : '.*-> \(.*\)$'`
51+
if expr "$link" : '/.*' > /dev/null; then
52+
PRG="$link"
53+
else
54+
PRG=`dirname "$PRG"`"/$link"
55+
fi
10056
done
101-
102-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
57+
SAVED="`pwd`"
58+
cd "`dirname \"$PRG\"`/" >/dev/null
59+
APP_HOME="`pwd -P`"
60+
cd "$SAVED" >/dev/null
10361

10462
APP_NAME="Gradle"
105-
APP_BASE_NAME=${0##*/}
63+
APP_BASE_NAME=`basename "$0"`
10664

10765
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10866
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
10967

11068
# Use the maximum available, or set MAX_FD != -1 to use that value.
111-
MAX_FD=maximum
69+
MAX_FD="maximum"
11270

11371
warn () {
11472
echo "$*"
115-
} >&2
73+
}
11674

11775
die () {
11876
echo
11977
echo "$*"
12078
echo
12179
exit 1
122-
} >&2
80+
}
12381

12482
# OS specific support (must be 'true' or 'false').
12583
cygwin=false
12684
msys=false
12785
darwin=false
12886
nonstop=false
129-
case "$( uname )" in #(
130-
CYGWIN* ) cygwin=true ;; #(
131-
Darwin* ) darwin=true ;; #(
132-
MSYS* | MINGW* ) msys=true ;; #(
133-
NONSTOP* ) nonstop=true ;;
87+
case "`uname`" in
88+
CYGWIN* )
89+
cygwin=true
90+
;;
91+
Darwin* )
92+
darwin=true
93+
;;
94+
MINGW* )
95+
msys=true
96+
;;
97+
NONSTOP* )
98+
nonstop=true
99+
;;
134100
esac
135101

136102
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -140,9 +106,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
140106
if [ -n "$JAVA_HOME" ] ; then
141107
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
142108
# IBM's JDK on AIX uses strange locations for the executables
143-
JAVACMD=$JAVA_HOME/jre/sh/java
109+
JAVACMD="$JAVA_HOME/jre/sh/java"
144110
else
145-
JAVACMD=$JAVA_HOME/bin/java
111+
JAVACMD="$JAVA_HOME/bin/java"
146112
fi
147113
if [ ! -x "$JAVACMD" ] ; then
148114
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -151,103 +117,88 @@ Please set the JAVA_HOME variable in your environment to match the
151117
location of your Java installation."
152118
fi
153119
else
154-
JAVACMD=java
120+
JAVACMD="java"
155121
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
156122
157123
Please set the JAVA_HOME variable in your environment to match the
158124
location of your Java installation."
159125
fi
160126

161127
# Increase the maximum file descriptors if we can.
162-
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
163-
case $MAX_FD in #(
164-
max*)
165-
MAX_FD=$( ulimit -H -n ) ||
166-
warn "Could not query maximum file descriptor limit"
167-
esac
168-
case $MAX_FD in #(
169-
'' | soft) :;; #(
170-
*)
171-
ulimit -n "$MAX_FD" ||
172-
warn "Could not set maximum file descriptor limit to $MAX_FD"
173-
esac
128+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
129+
MAX_FD_LIMIT=`ulimit -H -n`
130+
if [ $? -eq 0 ] ; then
131+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
132+
MAX_FD="$MAX_FD_LIMIT"
133+
fi
134+
ulimit -n $MAX_FD
135+
if [ $? -ne 0 ] ; then
136+
warn "Could not set maximum file descriptor limit: $MAX_FD"
137+
fi
138+
else
139+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
140+
fi
174141
fi
175142

176-
# Collect all arguments for the java command, stacking in reverse order:
177-
# * args from the command line
178-
# * the main class name
179-
# * -classpath
180-
# * -D...appname settings
181-
# * --module-path (only if needed)
182-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
143+
# For Darwin, add options to specify how the application appears in the dock
144+
if $darwin; then
145+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
146+
fi
183147

184148
# For Cygwin or MSYS, switch paths to Windows format before running java
185-
if "$cygwin" || "$msys" ; then
186-
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
187-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
188-
189-
JAVACMD=$( cygpath --unix "$JAVACMD" )
190-
149+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
150+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
151+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
152+
153+
JAVACMD=`cygpath --unix "$JAVACMD"`
154+
155+
# We build the pattern for arguments to be converted via cygpath
156+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
157+
SEP=""
158+
for dir in $ROOTDIRSRAW ; do
159+
ROOTDIRS="$ROOTDIRS$SEP$dir"
160+
SEP="|"
161+
done
162+
OURCYGPATTERN="(^($ROOTDIRS))"
163+
# Add a user-defined pattern to the cygpath arguments
164+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
165+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
166+
fi
191167
# Now convert the arguments - kludge to limit ourselves to /bin/sh
192-
for arg do
193-
if
194-
case $arg in #(
195-
-*) false ;; # don't mess with options #(
196-
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
197-
[ -e "$t" ] ;; #(
198-
*) false ;;
199-
esac
200-
then
201-
arg=$( cygpath --path --ignore --mixed "$arg" )
168+
i=0
169+
for arg in "$@" ; do
170+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
171+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
172+
173+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
174+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
175+
else
176+
eval `echo args$i`="\"$arg\""
202177
fi
203-
# Roll the args list around exactly as many times as the number of
204-
# args, so each arg winds up back in the position where it started, but
205-
# possibly modified.
206-
#
207-
# NB: a `for` loop captures its iteration list before it begins, so
208-
# changing the positional parameters here affects neither the number of
209-
# iterations, nor the values presented in `arg`.
210-
shift # remove old arg
211-
set -- "$@" "$arg" # push replacement arg
178+
i=`expr $i + 1`
212179
done
180+
case $i in
181+
0) set -- ;;
182+
1) set -- "$args0" ;;
183+
2) set -- "$args0" "$args1" ;;
184+
3) set -- "$args0" "$args1" "$args2" ;;
185+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
186+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
187+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
188+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
189+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
190+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
191+
esac
213192
fi
214193

215-
# Collect all arguments for the java command;
216-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
217-
# shell script including quotes and variable substitutions, so put them in
218-
# double quotes to make sure that they get re-expanded; and
219-
# * put everything else in single quotes, so that it's not re-expanded.
220-
221-
set -- \
222-
"-Dorg.gradle.appname=$APP_BASE_NAME" \
223-
-classpath "$CLASSPATH" \
224-
org.gradle.wrapper.GradleWrapperMain \
225-
"$@"
226-
227-
# Use "xargs" to parse quoted args.
228-
#
229-
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
230-
#
231-
# In Bash we could simply go:
232-
#
233-
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
234-
# set -- "${ARGS[@]}" "$@"
235-
#
236-
# but POSIX shell has neither arrays nor command substitution, so instead we
237-
# post-process each arg (as a line of input to sed) to backslash-escape any
238-
# character that might be a shell metacharacter, then use eval to reverse
239-
# that process (while maintaining the separation between arguments), and wrap
240-
# the whole thing up as a single "set" statement.
241-
#
242-
# This will of course break if any of these variables contains a newline or
243-
# an unmatched quote.
244-
#
194+
# Escape application args
195+
save () {
196+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
197+
echo " "
198+
}
199+
APP_ARGS=`save "$@"`
245200

246-
eval "set -- $(
247-
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
248-
xargs -n1 |
249-
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
250-
tr '\n' ' '
251-
)" '"$@"'
201+
# Collect all arguments for the java command, following the shell quoting and substitution rules
202+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
252203

253204
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
43+
if "%ERRORLEVEL%" == "0" goto init
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
5454
set JAVA_HOME=%JAVA_HOME:"=%
5555
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5656

57-
if exist "%JAVA_EXE%" goto execute
57+
if exist "%JAVA_EXE%" goto init
5858

5959
echo.
6060
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,14 +64,29 @@ echo location of your Java installation.
6464

6565
goto fail
6666

67+
:init
68+
@rem Get command-line arguments, handling Windows variants
69+
70+
if not "%OS%" == "Windows_NT" goto win9xME_args
71+
72+
:win9xME_args
73+
@rem Slurp the command line arguments.
74+
set CMD_LINE_ARGS=
75+
set _SKIP=2
76+
77+
:win9xME_args_slurp
78+
if "x%~1" == "x" goto execute
79+
80+
set CMD_LINE_ARGS=%*
81+
6782
:execute
6883
@rem Setup the command line
6984

7085
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7186

7287

7388
@rem Execute Gradle
74-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
89+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
7590

7691
:end
7792
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)