KEYCLOAK-6664 Fix performance testsuite shell scripts to run on macOS

This commit is contained in:
Marko Strukelj authored and Pavel Drozd committed 2018-02-22 12:40:23 +01:00
1 parent 548ab4f78c
commit eea6eb6263
3 files changed
+15 -6

No files matched your search

+9
View File
@@ -262,3 +262,12 @@ Make sure to set 'Use classpath of module' to 'performance-test'.
When tests are executed via maven, the Engine object is not used. It exists only for running tests in IDE.
If test startup fails due to not being able to find the test classes try reimporting the 'performance' module from pom.xml (right click on 'performance' directory, select 'Maven' at the bottom of context menu, then 'Reimport')
If you want to run a different simulation - not DefaultSimulation - you can edit Engine object source, or create another Engine object for a different simulation.
## Troubleshoot
### Verbose logging
You can find `logback-test.xml` file in `tests/src/test/resources` directory. This files contains logging information in log4j xml format.
Root logger is by default set to WARN, but if you want to increase verbosity you can change it to DEBUG or INFO.
@@ -4,7 +4,7 @@
function runCommand() {
echo "$1"
if ! eval "$1" ; then
if ! eval "$1" ; then
echo "Execution of command failed."
echo "Command: \"$1\""
exit 1;
@@ -124,8 +124,8 @@ function generateProvisionedSystemProperties() {
function loadProvisionedSystemProperties() {
if [ -f $PROVISIONED_SYSTEM_PROPERTIES_FILE ]; then
echo "Loading $PROVISIONED_SYSTEM_PROPERTIES_FILE"
export DEPLOYMENT=$( grep -Po "(?<=^deployment=).*" $PROVISIONED_SYSTEM_PROPERTIES_FILE )
export KEYCLOAK_SERVICES=$( grep -Po "(?<=^keycloak.docker.services=).*" $PROVISIONED_SYSTEM_PROPERTIES_FILE )
export DEPLOYMENT=$( sed -n -e '/deployment=/ s/.*\= *//p' $PROVISIONED_SYSTEM_PROPERTIES_FILE )
export KEYCLOAK_SERVICES=$( sed -n -e '/keycloak.docker.services=/ s/.*\= *//p' $PROVISIONED_SYSTEM_PROPERTIES_FILE )
else
echo "$PROVISIONED_SYSTEM_PROPERTIES_FILE not found."
fi
+3 -3
View File
@@ -12,8 +12,8 @@ function isKeycloakServerReady {
if [ -f "$PROVISIONED_SYSTEM_PROPERTIES_FILE" ] ; then
FRONTEND_SERVERS=$( grep -Po "(?<=^keycloak.frontend.servers=).*" "$PROVISIONED_SYSTEM_PROPERTIES_FILE" )
BACKEND_SERVERS=$( grep -Po "(?<=^keycloak.backend.servers=).*" "$PROVISIONED_SYSTEM_PROPERTIES_FILE" )
FRONTEND_SERVERS=$( sed -n -e '/keycloak.frontend.servers=/ s/.*\= *//p' "$PROVISIONED_SYSTEM_PROPERTIES_FILE" )
BACKEND_SERVERS=$( sed -n -e '/keycloak.backend.servers=/ s/.*\= *//p' "$PROVISIONED_SYSTEM_PROPERTIES_FILE" )
KEYCLOAK_SERVERS="$FRONTEND_SERVERS $BACKEND_SERVERS"
HEALTHCHECK_ITERATIONS=${HEALTHCHECK_ITERATIONS:-20}
@@ -30,7 +30,7 @@ if [ -f "$PROVISIONED_SYSTEM_PROPERTIES_FILE" ] ; then
echo System healthcheck failed.
exit 1
fi
echo $( date -Iseconds )
echo $( date "+%Y-%m-%d %H:%M:%S" )
READY=true
for SERVER in $KEYCLOAK_SERVERS ; do
if isKeycloakServerReady $SERVER; then