79098912

Date: 2024-10-17 15:55:59
Score: 2.5
Natty:
Report link

Some of my assumptions were incorrect. The tests were slowing down, but the culprit wasn't memory creep, but an issue with Robolectic and Compose.

https://github.com/robolectric/robolectric/issues/9043

In the end, creating a junit rule that resets the AndroidUIDispatcher's Choreographer solved the issue.

Here's a gist for junit rule: https://gist.github.com/johngray1965/24d7a3f1e5ae5f0fc1adc24444fe12ac

Note: it was very important that the rule runs before the compose rule (otherwise the compose rule may fail).

Reasons:
  • Contains signature (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: johngray1965