|
1 | 1 | @openjdk
|
2 |
| -@ubi8/openjdk-8 |
3 |
| -@ubi8/openjdk-11 |
4 |
| -@ubi8/openjdk-17 |
5 | 2 | @redhat-openjdk-18
|
| 3 | +@ubi8 |
6 | 4 | Feature: Openshift OpenJDK GC tests
|
7 | 5 |
|
8 | 6 | Scenario: Check default GC configuration
|
9 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
10 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 |
11 |
| - And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 |
| 7 | + Given container is started as uid 1000 |
| 8 | + Then container log should contain -XX:+UseParallelGC |
| 9 | + And container log should contain -XX:MinHeapFreeRatio=10 |
| 10 | + And container log should contain -XX:MaxHeapFreeRatio=20 |
| 11 | + And container log should contain -XX:GCTimeRatio=4 |
12 | 12 |
|
13 | 13 | Scenario: Check GC_MIN_HEAP_FREE_RATIO GC configuration
|
14 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
| 14 | + Given container is started with env |
15 | 15 | | variable | value |
|
16 | 16 | | GC_MIN_HEAP_FREE_RATIO | 5 |
|
17 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 |
18 |
| - And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 |
| 17 | + Then container log should contain -XX:MinHeapFreeRatio=5 |
19 | 18 |
|
20 | 19 | Scenario: Check GC_MAX_HEAP_FREE_RATIO GC configuration
|
21 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
| 20 | + Given container is started with env |
22 | 21 | | variable | value |
|
23 | 22 | | GC_MAX_HEAP_FREE_RATIO | 50 |
|
24 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 |
25 |
| - And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 |
| 23 | + Then container log should contain -XX:MaxHeapFreeRatio=50 |
26 | 24 |
|
27 | 25 | Scenario: Check GC_TIME_RATIO GC configuration
|
28 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
| 26 | + Given container is started with env |
29 | 27 | | variable | value |
|
30 | 28 | | GC_TIME_RATIO | 5 |
|
31 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90 |
32 |
| - And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90 |
| 29 | + Then container log should contain -XX:GCTimeRatio=5 |
33 | 30 |
|
34 | 31 | Scenario: Check GC_ADAPTIVE_SIZE_POLICY_WEIGHT GC configuration
|
35 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
| 32 | + Given container is started with env |
36 | 33 | | variable | value |
|
37 | 34 | | GC_ADAPTIVE_SIZE_POLICY_WEIGHT | 80 |
|
38 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80 |
39 |
| - And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80 |
| 35 | + Then container log should contain -XX:AdaptiveSizePolicyWeight=80 |
40 | 36 |
|
41 | 37 | Scenario: Check GC_MAX_METASPACE_SIZE GC configuration
|
42 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
| 38 | + Given container is started with env |
43 | 39 | | variable | value |
|
44 | 40 | | GC_MAX_METASPACE_SIZE | 120 |
|
45 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m |
46 |
| - And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m |
| 41 | + Then container log should contain -XX:MaxMetaspaceSize=120m |
47 | 42 |
|
48 | 43 | Scenario: Check GC_CONTAINER_OPTIONS configuration
|
49 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
| 44 | + Given container is started with env |
50 | 45 | | variable | value |
|
51 | 46 | | GC_CONTAINER_OPTIONS | -XX:+UseG1GC |
|
52 |
| - Then s2i build log should contain Using MAVEN_OPTS -XX:+UseG1GC |
53 |
| - And container log should contain -XX:+UseG1GC |
| 47 | + Then container log should contain -XX:+UseG1GC |
54 | 48 | And container log should not contain -XX:+UseParallelGC
|
55 | 49 |
|
56 | 50 | Scenario: Check GC_METASPACE_SIZE GC configuration
|
57 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
58 |
| - | variable | value | |
| 51 | + Given container is started with env |
| 52 | + | variable | value | |
59 | 53 | | GC_METASPACE_SIZE | 120 |
|
60 |
| - Then s2i build log should contain -XX:MetaspaceSize=120m |
61 |
| - And container log should contain -XX:MetaspaceSize=120m |
| 54 | + Then container log should contain -XX:MetaspaceSize=120m |
62 | 55 | And container log should not contain integer expression expected
|
63 | 56 |
|
64 | 57 | Scenario: Check GC_METASPACE_SIZE constrained by GC_MAX_METASPACE_SIZE GC configuration
|
65 |
| - Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet |
66 |
| - | variable | value | |
67 |
| - | GC_METASPACE_SIZE | 120 | |
| 58 | + Given container is started with env |
| 59 | + | variable | value | |
| 60 | + | GC_METASPACE_SIZE | 120 | |
68 | 61 | | GC_MAX_METASPACE_SIZE | 90 |
|
69 |
| - Then s2i build log should contain -XX:MaxMetaspaceSize=90m -XX:MetaspaceSize=90m |
70 |
| - And container log should contain -XX:MaxMetaspaceSize=90m -XX:MetaspaceSize=90m |
| 62 | + Then container log should contain -XX:MaxMetaspaceSize=90m |
| 63 | + And container log should contain -XX:MetaspaceSize=90m |
71 | 64 |
|
0 commit comments