mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 05:15:04 +00:00
Allow individual projects to override test heapdump setting (#50096)
This commit goes from using a JvmArgumentProvider to using the normal Test task APIs for passing the `HeapDumpOnOutOfMemoryError` JVM argument. This makes it simpler for subprojects, such as lang-painless to override this setting if necessary. Closes #49117 (cherry picked from commit e97c38ff8e862abdc1d7816c66f9869ed216031f)
This commit is contained in:
parent
38b67f719e
commit
fdfb1950fc
@ -680,9 +680,10 @@ class BuildPlugin implements Plugin<Project> {
|
||||
test.exclude '**/*$*.class'
|
||||
|
||||
test.jvmArgs "-Xmx${System.getProperty('tests.heap.size', '512m')}",
|
||||
"-Xms${System.getProperty('tests.heap.size', '512m')}"
|
||||
"-Xms${System.getProperty('tests.heap.size', '512m')}",
|
||||
'-XX:+HeapDumpOnOutOfMemoryError'
|
||||
|
||||
test.jvmArgumentProviders.add({ ['-XX:+HeapDumpOnOutOfMemoryError', "-XX:HeapDumpPath=$heapdumpDir"] } as CommandLineArgumentProvider)
|
||||
test.jvmArgumentProviders.add({ ["-XX:HeapDumpPath=$heapdumpDir"] } as CommandLineArgumentProvider)
|
||||
|
||||
if (System.getProperty('tests.jvm.argline')) {
|
||||
test.jvmArgs System.getProperty('tests.jvm.argline').split(" ")
|
||||
|
Loading…
x
Reference in New Issue
Block a user