James Iuliano
10/09/2024, 7:39 PMtasks.withType<JavaExec>().configureEach {
jvmArgs("-Xmx1024m")
}
tasks.withType<Test>().configureEach {
jvmArgs("-Xmx1024m")
}
...and nothing takes. Thanks.Caleb Cushing
10/09/2024, 7:49 PMCaleb Cushing
10/09/2024, 7:50 PMCaleb Cushing
10/09/2024, 7:50 PMCaleb Cushing
10/09/2024, 7:51 PMCaleb Cushing
10/09/2024, 7:51 PMJames Iuliano
10/09/2024, 8:00 PMJames Iuliano
10/09/2024, 8:01 PMCaleb Cushing
10/09/2024, 8:01 PMJames Iuliano
10/09/2024, 8:01 PMCaleb Cushing
10/09/2024, 8:02 PMJames Iuliano
10/09/2024, 8:03 PM~/csvol/git/wavebid-a2o/wavebid-a2o-service:1195> ./gradlew test
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "mysql-cj-abandoned-connection-cleanup"
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 838
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 838
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 838
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 838
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DefaultDispatcher-worker-14"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DefaultDispatcher-worker-12"
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 838Caleb Cushing
10/09/2024, 8:03 PMJames Iuliano
10/09/2024, 8:04 PMCaleb Cushing
10/09/2024, 8:04 PMJames Iuliano
10/09/2024, 8:04 PMCaleb Cushing
10/09/2024, 8:04 PMCaleb Cushing
10/09/2024, 8:05 PMJames Iuliano
10/09/2024, 8:05 PMorg.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 3.
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:65)
at java.base@21/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base@21/java.lang.reflect.Method.invoke(Method.java:580)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
at jdk.proxy1/jdk.proxy1.$Proxy4.stop(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:200)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.lang.OutOfMemoryError: Java heap spaceInaki Villar
10/09/2024, 8:15 PMmaxHeapSize = "1G"
https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:maxHeapSize
jvmArgs does not include system properties and the minimum/maximum heap size.
Full example:
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.named<Test>("test") {
useJUnitPlatform()
maxHeapSize = "1G"
testLogging {
events("passed")
}
}James Iuliano
10/09/2024, 8:38 PMJames Iuliano
10/09/2024, 8:47 PM501 99080 97512 0 1:43PM ?? 0:37.68 /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/bin/java -Dorg.gradle.internal.worker.tmpdir=... -javaagent:... -Xmx1G -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 3'James Iuliano
10/09/2024, 8:47 PMEric Fenderbosch
10/09/2024, 8:51 PM