Skip to content

Commit 1ffbfbe

Browse files
khakhlyukHyukjinKwon
authored andcommitted
[MINOR][TEST][CONNECT][PYTHON] Fix flaky test_client.py test
### What changes were proposed in this pull request? Fix flaky test_client.py test. `test_not_found_recovers` is flaky, this can be reproduced by running the test repeatedly, e.g. with ``` seq 10 | xargs -I {} python/run-tests --testnames 'pyspark.sql.tests.connect.client.test_client' --python-executables=python ``` This change fixes the test. ### Why are the changes needed? Flaky test ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Test change, ran locally. ### Was this patch authored or co-authored using generative AI tooling? No Closes #51368 from khakhlyuk/alex-khakhlyuk_data/fix-flaky-test-client. Authored-by: Alex Khakhlyuk <alex.khakhlyuk@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent b1a9158 commit 1ffbfbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/sql/tests/connect/client/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def not_found():
423423
def checks():
424424
self.assertEqual(2, stub.execute_calls)
425425
self.assertEqual(0, stub.attach_calls)
426-
self.assertEqual(0, stub.release_calls)
426+
self.assertEqual(1, stub.release_calls)
427427
self.assertEqual(0, stub.release_until_calls)
428428

429429
eventually(timeout=1, catch_assertions=True)(checks)()

0 commit comments

Comments
 (0)