Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify main thread naming with mainline Robolectric #52

Closed
mannodermaus opened this issue May 8, 2024 · 2 comments
Closed

Unify main thread naming with mainline Robolectric #52

mannodermaus opened this issue May 8, 2024 · 2 comments

Comments

@mannodermaus
Copy link
Contributor

mannodermaus commented May 8, 2024

I'm investigating the integration of the Roborazzi library with JUnit 5 via this extension and it works pretty well already. However, one thing I found is that it expects the main thread spun up by Robolectric to conform to a specific naming convention. You can see here that they expect the thread to have either Main Thread or Test worker in its name.

In the mainline Robolectric repository, the naming convention seems to be SDK xx Main Thread (link), but the JUnit 5 extension uses Main-Thread-<threadId>-SDK-xx instead (link). This causes the file name lookup function from Roborazzi to fail to detect the test method correctly.

FWIW, I have to submit some changes to Roborazzi anyway so that it can fully embrace JUnit 5, so I can also just extend their main thread checking logic while I'm at it. However, can we unify this name to match up with mainline Robolectric, or is there a reason for the difference (parallel test execution, maybe)? I can provide a pull request if necessary. Thanks!

@warnyul
Copy link
Member

warnyul commented May 8, 2024

@mannodermaus I think we can change back the naming for SDK {apiLevel} Main Thread {threadId}

@warnyul
Copy link
Member

warnyul commented May 8, 2024

Updated in 0.5.2

@warnyul warnyul closed this as completed May 8, 2024
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

No branches or pull requests

2 participants