Skip to content

Commit

Permalink
UBI9: Rely on dynamic-resources 2.0. Updated JVM options tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdenise committed Aug 27, 2024
1 parent 67e20ec commit f8144fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
1 change: 1 addition & 0 deletions wildfly-builder-image/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ modules:
- name: jboss.container.openjdk.jdk
- name: jboss.container.maven
- name: jboss.container.wildfly.dynamic-resources
version: "2.0"
- name: jboss.container.maven.s2i
- name: jboss.container.wildfly.run
version: "2.0"
Expand Down
12 changes: 2 additions & 10 deletions wildfly-builder-image/tests/features/basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -418,23 +418,15 @@ Scenario: Test resource adapter extension, galleon s2i
Scenario: Check for adjusted heap sizes
When container integ- is started with args
| arg | value |
| env_json | {"JAVA_MAX_MEM_RATIO": 25, "JAVA_INITIAL_MEM_RATIO": 50} |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:InitialRAMPercentage=50.0\s
And container log should match regex ^ *JAVA_OPTS: *.* -XX:MaxRAMPercentage=25.0\s
| env_json | {"JAVA_MAX_MEM_RATIO": 25} |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:MaxRAMPercentage=25.0\s

# CLOUD-193 (mem-limit); CLOUD-459 (default heap size == max)
Scenario: CLOUD-193 Check for dynamic resource allocation
When container integ- is started with env
| variable | value |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:MaxRAMPercentage=80.0\s

# CLOUD-459 (override default heap size)
Scenario: CLOUD-459 Check for adjusted default heap size
When container integ- is started with args
| arg | value |
| env_json | {"INITIAL_HEAP_PERCENT": 0.5} |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:InitialRAMPercentage=50.0\s

Scenario: Check JAVA_DIAGNOSTICS disabled
When container integ- is started with env
| variable | value |
Expand Down
13 changes: 2 additions & 11 deletions wildfly-builder-image/tests/features/vanilla.feature
Original file line number Diff line number Diff line change
Expand Up @@ -114,24 +114,15 @@ Scenario: Check default GC configuration
Scenario: Check for adjusted heap sizes
When container integ- is started with args
| arg | value |
| env_json | {"JAVA_MAX_MEM_RATIO": 25, "JAVA_INITIAL_MEM_RATIO": 50} |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:InitialRAMPercentage=50.0\s
And container log should match regex ^ *JAVA_OPTS: *.* -XX:MaxRAMPercentage=25.0\s
| env_json | {"JAVA_MAX_MEM_RATIO": 25} |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:MaxRAMPercentage=25.0\s

# CLOUD-193 (mem-limit); CLOUD-459 (default heap size == max)
Scenario: CLOUD-193 Check for dynamic resource allocation
When container integ- is started with env
| variable | value |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:MaxRAMPercentage=80.0\s


# CLOUD-459 (override default heap size)
Scenario: CLOUD-459 Check for adjusted default heap size
When container integ- is started with args
| arg | value |
| env_json | {"INITIAL_HEAP_PERCENT": 0.5} |
Then container log should match regex ^ *JAVA_OPTS: *.* -XX:InitialRAMPercentage=50.0\s

Scenario: Check if image shuts down with TERM signal
When container integ- is started with env
| variable | value |
Expand Down
1 change: 1 addition & 0 deletions wildfly-runtime-image/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ modules:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jdk
- name: jboss.container.wildfly.dynamic-resources
version: "2.0"
- name: jboss.container.wildfly.run
version: "2.0"
- name: jboss.container.wildfly.cleanup
Expand Down

0 comments on commit f8144fd

Please sign in to comment.