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

[ST] Use ThreadLocal in ResourceManager #9687

Merged
merged 1 commit into from Feb 15, 2024
Merged

Conversation

kornys
Copy link
Contributor

@kornys kornys commented Feb 14, 2024

Type of change

  • Enhancement / new feature
  • Refactoring

Description

Currently due to parallelism of tests every method for creating and work with resources has to pass junit extension context which is overkill and I would say no new developer understand it.
Instead of passing extension context for identifying test context in parallel run, I added ThreadLocal which can hold extenstion context for every thread in which test is running. With this change test suite itself set enxtensionContext of the test Method or Class and test developer does not need to pass extenstion context in methods so code looks more logical and clean.

Checklist

  • Make sure all tests pass
  • Update documentation

@kornys kornys marked this pull request as draft February 14, 2024 17:09
@kornys kornys added this to the 0.40.0 milestone Feb 14, 2024
@kornys
Copy link
Contributor Author

kornys commented Feb 14, 2024

/packit test --labels acceptance

@kornys kornys self-assigned this Feb 14, 2024
@Frawless
Copy link
Member

/packit test --labels regression

@kornys
Copy link
Contributor Author

kornys commented Feb 15, 2024

/packit test --labels regression

@kornys kornys marked this pull request as ready for review February 15, 2024 09:15
@kornys kornys marked this pull request as draft February 15, 2024 09:16
Signed-off-by: David Kornel <kornys@outlook.com>
@kornys
Copy link
Contributor Author

kornys commented Feb 15, 2024

/packit test --labels regression

@kornys kornys marked this pull request as ready for review February 15, 2024 10:09
@Frawless
Copy link
Member

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@see-quick see-quick left a comment

Choose a reason for hiding this comment

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

This is really great improvement! Thanks for that @kornys ! 💯 👍

@im-konge im-konge merged commit ca37a6f into strimzi:main Feb 15, 2024
25 checks passed
@kornys kornys deleted the rm-refactor branch February 15, 2024 19:15
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.

None yet

5 participants