takahirom / roborazzi

Make JVM Android integration test visible 🤖📸
https://takahirom.github.io/roborazzi/
Apache License 2.0
649 stars 24 forks source link

Slowdown/Hang on many failing tests #375

Closed yschimke closed 1 month ago

yschimke commented 1 month ago

Possibly related to this

https://github.com/takahirom/roborazzi/blob/6d59f05770aacb7d18d6710ed16e282c42fe16a7/roborazzi-compose/src/main/java/com/github/takahirom/roborazzi/RoborazziCompose.kt#L43-L46

If roborazzi has a lot of failures, either legit failures, or just as part of verifyAndRecordRoborazzi updates, it appears to eventually hang.

I'm suspecting the closing of activities breaks when an error happens.

I can work on a repro if it helps, but suspect this might be known issue?

takahirom commented 1 month ago

I've implemented the changes using the use block for ActivityScenario. What do you think? https://github.com/takahirom/roborazzi/pull/376/files

yschimke commented 1 month ago

Looks good, feel free to close this and I'll reopen if it's happening again on the release with this.

I'm not actually sure it's this code path, it's mainly that I've observed green builds are fast, and failing builds are slow or timeout.

takahirom commented 1 month ago

Thank you for reporting this!