robolectric / robolectric

Android Unit Testing Framework
http://robolectric.org
Other
5.81k stars 1.36k forks source link

Force ordering on MemoryLeaksTest to make it deterministic. #9084

Closed copybara-service[bot] closed 2 weeks ago

copybara-service[bot] commented 2 weeks ago

Force ordering on MemoryLeaksTest to make it deterministic.

This test would miss errors when sharding was used, making it brittle. It also had an issue where if the between test tests were ordered towards the end of the list, they would miss out on bugs where static state created once per test class would leak but not during those two tests. By forcing these tests to be the first ones that run using alphabetically ordering, we can ensure bugs like that are caught both internally and on github.