File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
modules/jvm/bash/artifacts/opt/jboss/container/java/jvm Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,11 @@ gc_config() {
144
144
145
145
if [ -n " ${GC_METASPACE_SIZE} " ]; then
146
146
metaspaceSize=${GC_METASPACE_SIZE}
147
- # clamp the max size of metaspaceSize to be <= maxMetaspaceSize
148
- if [ " ${metaspaceSize} " -gt " ${maxMetaspaceSize} " ]; then
149
- metaspaceSize=${maxMetaspaceSize}
147
+ if [ -n " ${maxMetaspaceSize} " ]; then
148
+ # clamp the max size of metaspaceSize to be <= maxMetaspaceSize
149
+ if [ " ${metaspaceSize} " -gt " ${maxMetaspaceSize} " ]; then
150
+ metaspaceSize=${maxMetaspaceSize}
151
+ fi
150
152
fi
151
153
fi
152
154
Original file line number Diff line number Diff line change @@ -53,3 +53,20 @@ Feature: Openshift OpenJDK GC tests
53
53
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseG1GC
54
54
And container log should contain -XX:+UseG1GC
55
55
And container log should not contain -XX:+UseParallelGC
56
+
57
+ Scenario : Check GC_METASPACE_SIZE GC configuration
58
+ Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
59
+ | variable | value |
60
+ | GC_METASPACE_SIZE | 120 |
61
+ Then s2i build log should contain -XX:MetaspaceSize=120m
62
+ And container log should contain -XX:MetaspaceSize=120m
63
+ And container log should not contain integer expression expected
64
+
65
+ Scenario : Check GC_METASPACE_SIZE constrained by GC_MAX_METASPACE_SIZE GC configuration
66
+ Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
67
+ | variable | value |
68
+ | GC_METASPACE_SIZE | 120 |
69
+ | GC_MAX_METASPACE_SIZE | 90 |
70
+ Then s2i build log should contain -XX:MaxMetaspaceSize=90m -XX:MetaspaceSize=90m
71
+ And container log should contain -XX:MaxMetaspaceSize=90m -XX:MetaspaceSize=90m
72
+
You can’t perform that action at this time.
0 commit comments