-
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
Test Timeout not respected in parallel="methods" mode #2009
Comments
The latest released version of TestNG is |
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Jan 30, 2019
Closes testng-team#2009 When TestNG runs parallel tests without an executor monitoring the threads, the timeouts defined in the test methods aren’t honored and TestNG ends up running the tests till it runs to completion and then uses the timeout value to mark the test as failed. Fixed this by running the test only for as long as the timeout has been defined after which the current thread (which is where the test is running as well) is interrupted.
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Jan 30, 2019
Closes testng-team#2009 When TestNG runs parallel tests without an executor monitoring the threads, the timeouts defined in the test methods aren’t honored and TestNG ends up running the tests till it runs to completion and then uses the timeout value to mark the test as failed. Fixed this by running the test only for as long as the timeout has been defined after which the current thread (which is where the test is running as well) is interrupted.
2 tasks
@Tygerian - Please ignore the previous comment. The issue exists and I have fixed it. |
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Jan 31, 2019
Closes testng-team#2009 When TestNG runs parallel tests without an executor monitoring the threads, the timeouts defined in the test methods aren’t honored and TestNG ends up running the tests till it runs to completion and then uses the timeout value to mark the test as failed. Fixed this by running the test only for as long as the timeout has been defined after which the current thread (which is where the test is running as well) is interrupted.
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Jan 31, 2019
Closes testng-team#2009 When TestNG runs parallel tests without an executor monitoring the threads, the timeouts defined in the test methods aren’t honored and TestNG ends up running the tests till it runs to completion and then uses the timeout value to mark the test as failed. Fixed this by running the test only for as long as the timeout has been defined after which the current thread (which is where the test is running as well) is interrupted.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TestNG Version
6.14.3
Expected behavior
Test thread is terminated if it takes longer than its timeout setting when running in parallel="methods" mode.
Actual behavior
Test is allowed to finish no matter how long it takes; the timeout setting only determines whether it will be marked as failed. This is similar to #811.
Is the issue reproducible on runner?
Test case sample
The text was updated successfully, but these errors were encountered: