diff --git a/library/glassfish b/library/glassfish index 0b7c50659d5565..60f557af35d905 100644 --- a/library/glassfish +++ b/library/glassfish @@ -3,7 +3,7 @@ Maintainers: David Matejcek (@dmatej), Ondro Mihalyi (@ondromih) GitRepo: https://github.com/OmniFish-EE/docker-library-glassfish.git GitFetch: refs/heads/main -GitCommit: 12efd43d7633d89cb28edf3a5b0cf3c12ac31c1f +GitCommit: 3e22307467c6f9557077f9eb4d481e3ede8df30f Tags: 7.0.0, 7.0.0-jdk17, 7.0.0-jdk17-eclipse-temurin Architectures: amd64 diff --git a/test/tests/glassfish/run.sh b/test/tests/glassfish/run.sh index ad6cea9a9f4079..c339512b540bb8 100755 --- a/test/tests/glassfish/run.sh +++ b/test/tests/glassfish/run.sh @@ -5,17 +5,23 @@ serverImage="$1" containerId="$(docker run -d "$serverImage")" trap "docker rm -vf $containerId > /dev/null" EXIT -logLine='^\s+Eclipse GlassFish\s+[\.0-9]+' -timeout=60 +waitForLogLine() { + timeout="$1"; + logLine="$2"; + until docker logs $containerId 2>&1 | grep -q -E "$logLine" + do + if [ $timeout -eq 0 ] + then + exit 100; + fi + sleep 1 + timeout=$((timeout-1)) + done +} -until docker logs $containerId 2>&1 | grep -q -E "$logLine" -do - if [ $timeout -eq 0 ] - then - exit 100; - fi - sleep 1 - timeout=$((timeout-1)) -done +waitForLogLine 60 '^\s+Eclipse GlassFish\s+[\.0-9]+'; +echo "GlassFish started as ${containerId}" -echo "Success!" +docker stop "${containerId}" & +waitForLogLine 30 '^\s+Completed shutdown of GlassFish runtime'; +echo "GlassFish stopped OK!"