From 9ea1f08d1071abc7e4c1658d6baaaa3760d7bda9 Mon Sep 17 00:00:00 2001 From: Valentyn Tymofieiev Date: Wed, 14 Oct 2026 15:54:21 -0700 Subject: [PATCH 1/2] Remove a race with another file write that is not essential to test presence of duplicates. --- sdks/python/apache_beam/io/fileio_test.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sdks/python/apache_beam/io/fileio_test.py b/sdks/python/apache_beam/io/fileio_test.py index 1c650653804c..356b78378ff4 100644 --- a/sdks/python/apache_beam/io/fileio_test.py +++ b/sdks/python/apache_beam/io/fileio_test.py @@ -366,13 +366,6 @@ def test_without_deduplication(self): file = self._create_temp_file(dir=tempdir) # Add file twice, since it will be matched for every interval files += [file, file] - # Add file name that will be created mid-pipeline - files.append(FileSystems.join(tempdir, 'extra')) - - def _create_extra_file(element): - writer = FileSystems.create(FileSystems.join(tempdir, 'extra')) - writer.close() - return element.path with TestPipeline() as p: match_continiously = ( @@ -382,8 +375,7 @@ def _create_extra_file(element): interval=interval, has_deduplication=False, start_timestamp=start, - stop_timestamp=stop) - | beam.Map(_create_extra_file)) + stop_timestamp=stop)) assert_that(match_continiously, equal_to(files)) From b4aa16819c6ad8bdb8e62e2d70dafa02b8acb534 Mon Sep 17 00:00:00 2001 From: Valentyn Tymofieiev Date: Fri, 16 Oct 2026 10:22:42 -0700 Subject: [PATCH 2/2] Replace removed functionality. --- sdks/python/apache_beam/io/fileio_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/python/apache_beam/io/fileio_test.py b/sdks/python/apache_beam/io/fileio_test.py index 356b78378ff4..3bb250a34bd2 100644 --- a/sdks/python/apache_beam/io/fileio_test.py +++ b/sdks/python/apache_beam/io/fileio_test.py @@ -375,8 +375,8 @@ def test_without_deduplication(self): interval=interval, has_deduplication=False, start_timestamp=start, - stop_timestamp=stop)) - + stop_timestamp=stop) + | beam.Map(lambda element: element.path)) assert_that(match_continiously, equal_to(files)) def test_match_updated_files(self):