-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-33793][TESTS] Introduce withExecutor to ensure proper cleanup in tests #30783
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
Conversation
…ng sure they are always stopped after the test.
|
ok to test |
|
Test build #132852 has started for PR 30783 at commit |
…in tests ### What changes were proposed in this pull request? This PR introduces a helper method `withExecutor` that handles the creation of an Executor object and ensures that it is always stopped in a finally block. The tests in ExecutorSuite have been refactored to use this method. ### Why are the changes needed? Recently an issue was discovered that leaked Executors (which are not explicitly stopped after a test) can cause other tests to fail due to the JVM being killed after 10 min. It is therefore crucial that tests always stop the Executor. By introducing this helper method, a simple pattern is established that can be easily adopted in new tests, which reduces the risk of regressions. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Run the ExecutorSuite locally. Closes #30783 from sander-goos/SPARK-33793-close-executors. Authored-by: Sander Goos <[email protected]> Signed-off-by: HyukjinKwon <[email protected]> (cherry picked from commit ddff94f) Signed-off-by: HyukjinKwon <[email protected]>
|
Merged to master and branch-3.1. @sander-goos, it has a minor conflict against branch-3.0. Would you mind if I ask to open a backporting PR to |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
Thanks for merging. Sure, here is the backport: #30801 |
…anup in tests Backport of: #30783 ### What changes were proposed in this pull request? This PR introduces a helper method `withExecutor` that handles the creation of an Executor object and ensures that it is always stopped in a finally block. The tests in ExecutorSuite have been refactored to use this method. ### Why are the changes needed? Recently an issue was discovered that leaked Executors (which are not explicitly stopped after a test) can cause other tests to fail due to the JVM being killed after 10 min. It is therefore crucial that tests always stop the Executor. By introducing this helper method, a simple pattern is established that can be easily adopted in new tests, which reduces the risk of regressions. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Run the ExecutorSuite locally. Closes #30801 from sander-goos/SPARK-33793-close-executors-3.0. Authored-by: Sander Goos <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
What changes were proposed in this pull request?
This PR introduces a helper method
withExecutorthat handles the creation of an Executor object and ensures that it is always stopped in a finally block. The tests in ExecutorSuite have been refactored to use this method.Why are the changes needed?
Recently an issue was discovered that leaked Executors (which are not explicitly stopped after a test) can cause other tests to fail due to the JVM being killed after 10 min. It is therefore crucial that tests always stop the Executor. By introducing this helper method, a simple pattern is established that can be easily adopted in new tests, which reduces the risk of regressions.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Run the ExecutorSuite locally.