Skip to content

Commit

Permalink
Fix for OOM memory errors in ejb30_lite_singleton suite
Browse files Browse the repository at this point in the history
Signed-off-by: anajosep <anand.francis.joseph.augustin@oracle.com>
  • Loading branch information
anajosep committed Jan 14, 2019
1 parent 616fdee commit dc90176
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Jenkinsfile
Expand Up @@ -89,6 +89,7 @@ spec:
- ip: "127.0.0.1"
hostnames:
- "localhost.localdomain"
- "james.local"
containers:
- name: jakartaeetck-ci
image: anajosep/cts-base:0.1
Expand All @@ -98,7 +99,7 @@ spec:
imagePullPolicy: Always
env:
- name: JAVA_TOOL_OPTIONS
value: -Xmx2G
value: -Xmx4G
resources:
limits:
memory: "8Gi"
Expand All @@ -114,7 +115,7 @@ spec:
imagePullPolicy: Always
env:
- name: JAVA_TOOL_OPTIONS
value: -Xmx1G
value: -Xmx2G
resources:
limits:
memory: "2Gi"
Expand Down Expand Up @@ -150,6 +151,7 @@ spec:
CTS_HOME = "/root"
ANT_OPTS = "-Djavax.xml.accessExternalStylesheet=all -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=file,http"
MAIL_USER="user01@james.local"
MAIL_HOST="localhost"
LANG="en_US.UTF-8"
DEFAULT_GF_BUNDLE_URL="https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/5.1.0-RC1/glassfish-5.1.0-RC1.zip"
}
Expand Down
16 changes: 8 additions & 8 deletions docker/run_jakartaeetck.sh
Expand Up @@ -160,6 +160,14 @@ mkdir -p ${CTS_HOME}/vi
unzip ${CTS_HOME}/latest-glassfish.zip -d ${CTS_HOME}/vi
chmod -R 777 ${CTS_HOME}/vi

if [[ $test_suite == ejb30/lite* ]] || [[ "ejb30" == $test_suite ]] ; then
echo "Using higher JVM memory for EJB Lite suites to avoid OOM errors"
sed -i 's/-Xmx512m/-Xmx2048m/g' ${CTS_HOME}/vi/glassfish5/glassfish/domains/domain1/config/domain.xml
sed -i 's/-Xmx1024m/-Xmx2048m/g' ${CTS_HOME}/vi/glassfish5/glassfish/domains/domain1/config/domain.xml
sed -i 's/-Xmx512m/-Xmx2048m/g' ${CTS_HOME}/ri/glassfish5/glassfish/domains/domain1/config/domain.xml
sed -i 's/-Xmx1024m/-Xmx2048m/g' ${CTS_HOME}/ri/glassfish5/glassfish/domains/domain1/config/domain.xml
fi

${CTS_HOME}/vi/glassfish5/glassfish/bin/asadmin --user admin --passwordfile ${CTS_HOME}/change-admin-password.txt change-admin-password
${CTS_HOME}/vi/glassfish5/glassfish/bin/asadmin --user admin --passwordfile ${ADMIN_PASSWORD_FILE} start-domain
${CTS_HOME}/vi/glassfish5/glassfish/bin/asadmin --user admin --passwordfile ${ADMIN_PASSWORD_FILE} version
Expand Down Expand Up @@ -272,14 +280,6 @@ if [ "servlet" == "${test_suite}" ]; then
sed -i 's/s1as\.java\.endorsed\.dirs=.*/s1as.java.endorsed.dirs=\$\{endorsed.dirs\}\$\{pathsep\}\$\{ts.home\}\/endorsedlib/g' ts.jte
fi

if [[ $test_suite == ejb30/lite* ]] || [[ "ejb30" == $test_suite ]] ; then
echo "Using higher JVM memory for EJB Lite suites to avoid OOM errors"
sed -i 's/-Xmx512m/-Xmx2048m/g' ${CTS_HOME}/vi/glassfish5/glassfish/domains/domain1/config/domain.xml
sed -i 's/-Xmx1024m/-Xmx2048m/g' ${CTS_HOME}/vi/glassfish5/glassfish/domains/domain1/config/domain.xml
sed -i 's/-Xmx512m/-Xmx2048m/g' ${CTS_HOME}/ri/glassfish5/glassfish/domains/domain1/config/domain.xml
sed -i 's/-Xmx1024m/-Xmx2048m/g' ${CTS_HOME}/ri/glassfish5/glassfish/domains/domain1/config/domain.xml
fi

if [ ! -z "${DATABASE}" ];then
if [ "JavaDB" == "${DATABASE}" ]; then
echo "Using the bundled JavaDB in GlassFish. No change in ts.jte required."
Expand Down

0 comments on commit dc90176

Please sign in to comment.