ryanmeowy opened a new pull request, #12711: URL: https://github.com/apache/seatunnel/pull/12711
### Purpose of this pull request `ElasticsearchIT` still reads the sink index once and asserts right away in three tests, so they fail whenever the bulk-written documents are not searchable yet when the job returns: - `testElasticsearchWithPITSlice` - `testElasticsearchWithPITSliceQueued` - `testElasticsearchWithScrollSlice` #12642 converted the other reads in this file to `Awaitility` polling but missed these three. This PR wraps them in the same polling block, so these are now the only un-polled read sites in the file (`grep -n readSinkDataWith`). ### Does this PR introduce _any_ user-facing change? No. Test-only change: no connector or engine code is modified. ### How was this patch tested? The three tests fail on current `dev` (`0278a6a74`), run 37927712604, job `elasticsearch-connector-it (11)` (job id 113826748556): `Tests run: 94, Failures: 7`, and all seven failures are these three tests, with `iterable lengths differ, expected: <11> but was: <0>` (5x), `<11> but was: <10>` (1x) and `iterable contents differ at index [1]` on Spark (2x). The result is not deterministic: in that same job `/elasticsearch/elasticsearch_source_with_pit_slice.conf` passes on flink-1.13.6 and flink-1.18.0 and fails on flink-1.15.3 and flink-1.20.1, and the Zeta variant of the same tests does not fail, while the sibling assertions in this file that already poll (`testElasticsearchWithPIT`, `testElasticsearchWithNestSchema`, ...) are green. Reading "0 of 11" documents points at visibility rather than at the slicing logic. With this change each assertion is retried for up to `INDEX_REFRESH_TIMEOUT_SECONDS` (60s) with a 1s interval, exactly as `testElasticsearchWithPIT` does. CI on this PR runs `elasticsearch-connector-it` because the `changes` job selects the modified module. Related: #12642 (same approach), #12643 (same approach for `ElasticsearchAuthIT`). -- 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]
