Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture memory leak failures during tests #1188

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@ jobs:
env:
OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''

- name: Detect Memory Dumps
if: failure()
run: |
if find . -type f -name "*.hprof" | grep -q '.'; then
echo "::group::Memory Dumps Detected"
echo "::warning::Memory dumps were found and uploaded as artifacts. Review these files to diagnose OOM issues."
echo "To download and inspect these files, navigate to 'Actions' -> 'Artifacts'."
echo "::endgroup::"
fi

- name: Upload memory dump
if: failure()
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: memory-dumps
path: ./**/*.hprof

- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ subprojects {
systemProperty 'junit.jupiter.execution.parallel.enabled', 'false'
systemProperty 'log4j2.contextSelector', 'org.apache.logging.log4j.core.selector.BasicContextSelector'
// Verify assertions in tests
jvmArgs '-ea'
jvmArgs = ['-ea', '-XX:+HeapDumpOnOutOfMemoryError']
jacoco.enabled = true
}

Expand Down
Loading