cisaacstern commented on PR #27618:
URL: https://github.com/apache/beam/pull/27618#issuecomment-1771607417
In working on testing, I stumbled across the somewhat alarming fact that
something in this PR is resulting in `assert_that` _**always passing**_,
including when asked to evaluate plainly falsey expressions such as `0 == 1`,
e.g. the following `test_zero_equals_one` should obviously fail, as it does on
the `DirectRunner` parametrization, but running with the `DaskRunner` (from
this PR) results in an `XPASS` (i.e. unexpected pass):
```python
import apache_beam as beam
import pytest
from apache_beam.runners.dask.dask_runner import DaskRunner
from apache_beam.testing import test_pipeline
from apache_beam.testing.util import assert_that, equal_to
runners = ["DirectRunner", DaskRunner()]
runner_ids = ["DirectRunner", "DaskRunner"]
@pytest.mark.xfail(strict=True) # These tests **SHOULD FAIL** because 0 != 1
@pytest.mark.parametrize("runner", runners, ids=runner_ids)
def test_zero_equals_one(runner):
with test_pipeline.TestPipeline(runner=runner) as p:
pcoll = p | beam.Create([0])
assert_that(pcoll, equal_to([1]))
```
I wrote up
https://github.com/cisaacstern/dask-windowing-assert-that-broken/pull/1 as a
gut check that this was a regression unique to this PR, and the CI there
convinces me that this issue does not effect the DaskRunner as released in
`2.51.0`:
<img width="795" alt="Screen Shot 2023-10-19 at 12 43 57 PM"
src="https://github.com/apache/beam/assets/62192187/eacb68e5-8b57-49a2-accd-cb60d81b64fd">
Certainly open to any suggestions from others as to what may be causing
this, but I don't yet feel blocked here, just will need a bit more time to dig
into what is causing this, and then will report back here with my findings.
--
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]