You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2024/09/10 17:04:39 UTC

(beam) branch users/damccorm/test_fix created (now 15fe088cbab)

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a change to branch users/damccorm/test_fix
in repository https://gitbox.apache.org/repos/asf/beam.git


      at 15fe088cbab Dont run flaky test on windows

This branch includes the following new commits:

     new a255d783dde Revert "Try deflaking test timing (#32351)"
     new 15fe088cbab Dont run flaky test on windows

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(beam) 01/02: Revert "Try deflaking test timing (#32351)"

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/test_fix
in repository https://gitbox.apache.org/repos/asf/beam.git

commit a255d783ddef3d0e20a67c3aa68273881aa84222
Author: Danny McCormick <da...@google.com>
AuthorDate: Tue Sep 10 12:54:54 2024 -0400

    Revert "Try deflaking test timing (#32351)"
    
    This reverts commit 7d6f6fb55bc9ffed3468828487132b039daacd3a.
---
 sdks/python/apache_beam/ml/inference/base_test.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sdks/python/apache_beam/ml/inference/base_test.py b/sdks/python/apache_beam/ml/inference/base_test.py
index 76772132784..359a372bc5b 100644
--- a/sdks/python/apache_beam/ml/inference/base_test.py
+++ b/sdks/python/apache_beam/ml/inference/base_test.py
@@ -887,12 +887,13 @@ class RunInferenceBaseTest(unittest.TestCase):
   def test_run_inference_timeout_does_garbage_collection(self):
     with tempfile.TemporaryDirectory() as tmp_dirname:
       tmp_path = os.path.join(tmp_dirname, 'tmp_filename')
+      expected_file_contents = 'Deleted FakeSlowModel'
       with TestPipeline() as pipeline:
         # Start with bad example which gets timed out.
         # Then provide plenty of time for GC to happen.
-        examples = [20] + [1] * 15 + [20, 20, 20]
+        examples = [20] + [1] * 15
         expected_good = [1] * 15
-        expected_bad = [20, 20, 20, 20]
+        expected_bad = [20]
         pcoll = pipeline | 'start' >> beam.Create(examples)
         main, other = pcoll | base.RunInference(
             FakeSlowModelHandler(
@@ -909,7 +910,7 @@ class RunInferenceBaseTest(unittest.TestCase):
 
       with open(tmp_path) as f:
         s = f.read()
-        self.assertNotEqual(s, '')
+        self.assertEqual(s, expected_file_contents)
 
   def test_run_inference_impl_inference_args(self):
     with TestPipeline() as pipeline:


(beam) 02/02: Dont run flaky test on windows

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/test_fix
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 15fe088cbaba64cca3ac8c2036576bbf4f9e5cc6
Author: Danny McCormick <da...@google.com>
AuthorDate: Tue Sep 10 13:04:23 2024 -0400

    Dont run flaky test on windows
---
 sdks/python/apache_beam/ml/inference/base_test.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdks/python/apache_beam/ml/inference/base_test.py b/sdks/python/apache_beam/ml/inference/base_test.py
index 359a372bc5b..31f02c9c61c 100644
--- a/sdks/python/apache_beam/ml/inference/base_test.py
+++ b/sdks/python/apache_beam/ml/inference/base_test.py
@@ -878,10 +878,10 @@ class RunInferenceBaseTest(unittest.TestCase):
           bad_without_error, equal_to(expected_bad), label='assert:failures')
 
   @unittest.skipIf(
-      sys.version_info < (3, 11),
+      sys.platform == "win32" or sys.version_info < (3, 11),
       "This test relies on the __del__ lifecycle method, but __del__ does " +
-      "not get invoked in the same way on older versions of Python, " +
-      "breaking this test. See " +
+      "not get invoked in the same way on older versions of Python or on " +
+      "windows, breaking this test. See " +
       "github.com/python/cpython/issues/87950#issuecomment-1807570983 " +
       "for example.")
   def test_run_inference_timeout_does_garbage_collection(self):