Skip to content

Commit da2b449

Browse files
committed
[SPARK-52053][PYTHON][TESTS] Enable test_job_cancellation and its parity test
<!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html 2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html 3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'. 4. Be sure to keep the PR description updated to reflect all changes. 5. Please write your PR title to summarize what this PR proposes. 6. If possible, provide a concise example to reproduce the issue for a faster review. 7. If you want to add a new configuration, please read the guideline first for naming configurations in 'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'. 8. If you want to add or modify an error type or message, please read the guideline first in 'common/utils/src/main/resources/error/README.md'. --> ### What changes were proposed in this pull request? Enable test_job_cancellation and its parity test ### Why are the changes needed? test coverage ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? ci ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#50845 from zhengruifeng/test_job_cancel. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>
1 parent 586c440 commit da2b449

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dev/sparktestsupport/modules.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ def __hash__(self):
526526
"pyspark.sql.tests.test_functions",
527527
"pyspark.sql.tests.test_group",
528528
"pyspark.sql.tests.test_sql",
529+
"pyspark.sql.tests.test_job_cancellation",
529530
"pyspark.sql.tests.arrow.test_arrow",
530531
"pyspark.sql.tests.arrow.test_arrow_map",
531532
"pyspark.sql.tests.arrow.test_arrow_cogrouped_map",
@@ -1053,6 +1054,7 @@ def __hash__(self):
10531054
"pyspark.sql.tests.connect.test_parity_functions",
10541055
"pyspark.sql.tests.connect.test_parity_group",
10551056
"pyspark.sql.tests.connect.test_parity_sql",
1057+
"pyspark.sql.tests.connect.test_parity_job_cancellation",
10561058
"pyspark.sql.tests.connect.test_parity_dataframe",
10571059
"pyspark.sql.tests.connect.test_parity_collection",
10581060
"pyspark.sql.tests.connect.test_parity_creation",

python/pyspark/sql/tests/test_job_cancellation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def tag2():
6060
t2.join()
6161

6262
self.assertIsNotNone(output1)
63-
self.assertEquals(output1, {"tag1"})
63+
self.assertEqual(output1, {"tag1"})
6464
self.assertIsNotNone(output2)
65-
self.assertEquals(output2, {"tag2"})
65+
self.assertEqual(output2, {"tag2"})
6666

6767
def check_job_cancellation(
6868
self, setter, canceller, thread_ids, thread_ids_to_cancel, thread_ids_to_run
@@ -166,6 +166,7 @@ def get_outer_local_prop():
166166
self.assertEqual(first, {"a", "b"})
167167
self.assertEqual(second, {"a", "b", "c"})
168168

169+
@unittest.skip("SPARK-52054: Should enable this test")
169170
def test_interrupt_tag(self):
170171
thread_ids = range(4)
171172
self.check_job_cancellation(

0 commit comments

Comments
 (0)