gemini-code-assist[bot] commented on code in PR #38320:
URL: https://github.com/apache/beam/pull/38320#discussion_r3161898151
##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -2448,7 +2448,7 @@ def check_threshold(bad, total, threshold,
window=DoFn.WindowParam):
else:
return result
- def expand_2_72_0(self, pcoll):
+ def expand(self, pcoll):
Review Comment:

This change appears to be an accidental regression. It renames
`expand_2_72_0` to `expand` and deletes the existing `expand` method (which was
located at lines 2463-2483 in the previous version). The deleted method
contained critical logic for handling type hints and dead letter tags for Beam
versions >= 2.73.0. This change is unrelated to the PR's objective of deflaking
a Java test and will break functionality in the Python SDK.
##########
sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileIOTest.java:
##########
@@ -376,6 +350,35 @@ public void testMatchWatchForNewFiles() throws
IOException, InterruptedException
p.run();
}
+ @Test
+ public void testMatchWatchForNewFiles_UnboundedPCollection() {
+ // Additional scenarios for testMatchWatchForNewFiles. Only construct the
pipeline and check
+ // output pcoll
+ final Path watchPath = tmpFolder.getRoot().toPath().resolve("watch");
+
Review Comment:

The `TestPipeline` rule enforces that `run()` must be called if any
transforms are applied to the pipeline. Since this new test only verifies the
boundedness of the `PCollection` and intentionally avoids calling `p.run()` to
save time/resources, it will fail with an `IllegalStateException:
TestPipeline.run() was never called.`
You should disable the abandoned node enforcement for this specific test to
allow it to pass without calling `run()`.
```java
public void testMatchWatchForNewFiles_UnboundedPCollection() {
p.enableAbandonedNodeEnforcement(false);
// Additional scenarios for testMatchWatchForNewFiles. Only construct
the pipeline and check
// output pcoll
final Path watchPath = tmpFolder.getRoot().toPath().resolve("watch");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]