Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi all. I'm in the process of migration from 5.11.3 to 6.0.0 right now, and I'm trying to implement class templates instead of test class inheritance. The issue I have with class templates is when a test class is annotated with @TestMethodOrder(MethodOrderer.OrderAnnotation.class), not only methods within the same invocation run sequentially (which is expected), but the whole invocations of this class template are being run sequentially as well. How can I make my class template invocations run in parallel while preserving test method order within each invocation?

You must be logged in to vote

Currently, I think the only way is to annotate the class with @Execution(CONCURRENT) and each test method with @Execution(SAME_THREAD). However, I also think that's needlessly restrictive and we should relax that. Could you please raise an issue?

Replies: 1 comment · 1 reply

Comment options

Currently, I think the only way is to annotate the class with @Execution(CONCURRENT) and each test method with @Execution(SAME_THREAD). However, I also think that's needlessly restrictive and we should relax that. Could you please raise an issue?

You must be logged in to vote
1 reply
@t-o-n-y-p
Comment options

Thanks for the explanation. While making this work, we also have to make sure that the @ResourceLock annotation has the class-template awareness. So if we have both annotations in place, invocations will respect a lock (and be run sequentially). Should I raise a separate issue for that?

Edited: I've just found out that @ResourceLock isn't applicable to class templates, that's unfortunate but definitely a separate issue (covered in #5025). I've raised the topic-related issue: #5024

Answer selected by t-o-n-y-p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.