Repository navigation
Keep the Neo4j core test JVMs for the whole test task - #16859
Merged
Merged
Conversation
Gradle counts forkEvery in the class files it hands to the JUnit Platform, not in the specs the platform runs. The module does not exclude inner and closure classes, so its 426 test class files and the 699 of the TCK restarted the test JVM about every 10 class files: a run on 4 forks started 116 JVMs for 119 specs, 49 of which ran no spec, and almost every spec ran in a cold JVM. In one JVM that runs every spec, the live heap peaks at 214 MB of the 1028 MB, with or without grails-test-listener.
✅ All tests passed ✅🏷️ Commit: 9bf6e60 Learn more about TestLens at testlens.app/docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
grails-data-neo4j-coredoesn't applygradle/test-config.gradle, and itstesttask restarts the test JVM withforkEvery = 10. Gradle countsforkEveryin the class files it hands to the JUnit Platform, not in the specs the platform runs.test-config.gradleexcludes**/*$*.class, but this module doesn't, so its 426 compiled test classes and the 699 classes of the TCK jar, closures, inner classes and domain classes included, each count. On 4 forks, as on CI, the task starts 116 JVMs for the 119 specs that run: 49 of them run no spec, 29 run one, and almost every spec starts in a cold JVM.This removes the
forkEvery, so each fork keeps its JVM for the whole task. #16837 does the same for the modules that applytest-config.gradle.Verification
-PmaxTestParallel=1), it grows from 29 MB to at most 214 MB of the module's 1028 MB heap, and the thread count drops back to 16 at the end. Withgrails-test-listeneron the classpath the curve is the same, so this PR doesn't add it: since Release the Introspector's BeanInfo cache after each TCK spec #16834 the TCK specs flush the Introspector's caches inGrailsDataTckManager.cleanupSpec(), and flushing them after the module's own specs too makes no measurable difference.:grails-data-neo4j-core:checkpasses with the same 126 classes and 616 tests, 94 of them skipped, as withforkEvery = 10../gradlew clean aggregateViolations --continuepasses.The
-Xmx1028Mstays. The measurements show that a smaller heap would do, but that is a separate change.Fixes #16856