From d6b974f8ceb5383e5f01cf87a267b7580f992ac1 Mon Sep 17 00:00:00 2001 From: Hyukjin Kwon Date: Tue, 20 Jul 2021 13:17:05 +0900 Subject: [PATCH] [SPARK-36216][PYTHON][TESTS] Increase timeout for StreamingLinearRegressionWithTests. test_parameter_convergence ### What changes were proposed in this pull request? Test is flaky (https://github.com/apache/spark/runs/3109815586): ``` Traceback (most recent call last): File "/__w/spark/spark/python/pyspark/mllib/tests/test_streaming_algorithms.py", line 391, in test_parameter_convergence eventually(condition, catch_assertions=True) File "/__w/spark/spark/python/pyspark/testing/utils.py", line 91, in eventually raise lastValue File "/__w/spark/spark/python/pyspark/testing/utils.py", line 82, in eventually lastValue = condition() File "/__w/spark/spark/python/pyspark/mllib/tests/test_streaming_algorithms.py", line 387, in condition self.assertEqual(len(model_weights), len(batches)) AssertionError: 9 != 10 ``` Should probably increase timeout ### Why are the changes needed? To avoid flakiness in the test. ### Does this PR introduce _any_ user-facing change? Nope, dev-only. ### How was this patch tested? CI should test it out. Closes #33427 from HyukjinKwon/SPARK-36216. Authored-by: Hyukjin Kwon Signed-off-by: Hyukjin Kwon --- python/pyspark/mllib/tests/test_streaming_algorithms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/mllib/tests/test_streaming_algorithms.py b/python/pyspark/mllib/tests/test_streaming_algorithms.py index f6c6779e83..ba0c86f646 100644 --- a/python/pyspark/mllib/tests/test_streaming_algorithms.py +++ b/python/pyspark/mllib/tests/test_streaming_algorithms.py @@ -388,7 +388,7 @@ class StreamingLinearRegressionWithTests(MLLibStreamingTestCase): return True # We want all batches to finish for this test. - eventually(condition, catch_assertions=True) + eventually(condition, 90, catch_assertions=True) w = array(model_weights) diff = w[1:] - w[:-1]