Tweak ram for screenshots testing #5947
Merged
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.
Summary
Our screenshot tests were limited because the default configuration was using a too small parameter for the size of the Heap. It has been fixed by Google but not yet published, since we are hitting the limit again even after limiting the numbers of screenshots, we need a way around because we are adding more and more screenshots and we can't disable them all the time.
I looked at how they've fixed the issue https://cs.android.com/android-studio/platform/tools/base/+/435cc74d31620583c8d561b00b83ac637b6fb881:preview/screenshot/screenshot-test-gradle-plugin/src/main/java/com/android/compose/screenshot/PreviewScreenshotGradlePlugin.kt and replicated in our repo.
I also tested locally how much RAM we need and bellow 3g we have the issue once I've enabled back all the screenshots for the onboarding.