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

Allow declaring exclusive resources for child nodes #4151

Merged

Conversation

vdmitrienko
Copy link
Contributor

@vdmitrienko vdmitrienko commented Nov 23, 2024

Issue: #3102

Overview

Allow declaring "shared resources" for direct child nodes via the new @ResourceLock(target = CHILDREN) attribute.

Using the @ResourceLock(target = CHILDREN) in a class-level annotation has the same semantics as adding an annotation with the same value and mode to each test method and nested test class declared in this class.

This may improve parallelization when a test class declares a READ lock, but only a few methods hold a READ_WRITE lock.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I only found some minor things.

@vdmitrienko
Copy link
Contributor Author

Looks good! I only found some minor things.

@marcphilipp thanks for the review 🙂

Updated according to the comments

@marcphilipp marcphilipp merged commit af6b502 into junit-team:main Nov 26, 2024
15 checks passed
@marcphilipp
Copy link
Member

Thank you for your contribution, @vdmitrienko! 👍

After merging, I noticed that the tests were in the wrong package/project so I moved them in c1a976e.

@vdmitrienko vdmitrienko deleted the #3102_allow_to_inherit_resource_locks branch November 26, 2024 09:16
@vdmitrienko
Copy link
Contributor Author

Thank you for your contribution, @vdmitrienko! 👍

My pleasure!

After merging, I noticed that the tests were in the wrong package/project so I moved them in c1a976e.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to inherit ResourceLocks that allows for more parallel execution of tests
3 participants