-
Notifications
You must be signed in to change notification settings - Fork 1k
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
-Dtestng.thread.affinity=true do not work when running multiple instance of test in parallel #2321
Comments
Hi, |
@kobebryant2007 - Yep.. I am aware of some issues with this feature. This is another such issue. I am guessing that this feature cannot be applied on a wide scale and perhaps may end up being confined to very specific use cases alone. This was an experimental feature to begin with. Let me see what can be done on this when I get some time. |
Yes, I think things would be complicated when facing multi-thread. I can do some investigation, but not sure could find the root cause. |
@kobebryant2007 - Sure. Please do post back the findings. |
After several investigation, I found that the root cause is related to the rules of how to maintain the dependency relationship. For now, TestNG using the test method name to identify a node in graph, but this seem not work when using parameter test with dependsOnMethods.
and another change in GraphThreadPoolExecutor
It's a draft that only to explain the root cause, you can check it first. BR |
@kobebryant2007 - Great. Why not raise this as a PR itself (since you have done all the hard work of figuring out all of this stuff) ? |
Sure, I'll do it later. |
…nce of test in parallel Closes testng-team#2321
…nce of test in parallel Closes testng-team#2321
…nce of test in parallel Closes #2321
…nce of test in parallel Closes #2321
TestNG Version
Expected behavior
two instance of test class should get different thread. All the test method within the test class should run in same thread.
Actual behavior
Test method of same instance are getting different thread.
Is the issue reproductible on runner?
Test case sample
The text was updated successfully, but these errors were encountered: