Skip to content

Build: Give unit tests a 2 GB heap - #284

Merged
d4rken merged 1 commit into
mainfrom
build/unit-test-heap
Nov 23, 2026
Merged

d4rken merged 1 commit into
mainfrom
build/unit-test-heap

Conversation

@d4rken

@d4rken d4rken commented Nov 23, 2026

Copy link
Copy Markdown
Member

What changed

No user-facing behavior change. Unit tests now run with a 2 GB heap instead of Gradle's 512 MB default.

Technical Context

  • CI failed twice with OutOfMemoryError: Java heap space while NewFeederQRTest loaded Robolectric's Android 9 jar, on Common: Call your station a receiver instead of a feeder #282 (testGplay) and Build: Save store screenshots without an alpha channel #283 (testFoss), in tests neither PR touched. Both passed on re-run.
  • Robolectric keeps one large android-all jar loaded per SDK the tests pin, and the suite pins four (34 by default, 33, 29, 28), so the default heap is borderline and the failure depends on test order.
  • Raising the heap covers every pinned SDK. Dropping NewFeederQRTest's sdk = [28] pin alone would leave the next pin to hit the same limit.

Unit tests ran in a JVM with Gradle's default 512 MB heap. Robolectric
keeps one android-all jar loaded per Android SDK the tests pin, and the
suite pins four (34 by default, 33, 29 and 28). On CI that ran out of
heap while NewFeederQRTest loaded the SDK 28 jar, on PR #282 (testGplay)
and PR #283 (testFoss), each time in tests the PR didn't touch.
@d4rken
d4rken merged commit e0a1fe1 into main Nov 23, 2026
18 of 19 checks passed
@d4rken
d4rken deleted the build/unit-test-heap branch November 23, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant