zhangshenghang opened a new pull request, #12642: URL: https://github.com/apache/seatunnel/pull/12642
## Purpose of the pull request The Elasticsearch IT relies on fixed `Thread.sleep(INDEX_REFRESH_MILL_DELAY)` (5s) waits before reading index docs / doc counts from Elasticsearch. Under CI load the index refresh regularly takes longer than the fixed delay, so the subsequent assertions observe stale (partial or empty) results and the tests fail intermittently even though the connector behaves correctly. This PR replaces those fixed sleeps with bounded `Awaitility` polling around the **unchanged** assertions, so the tests wait exactly as long as needed (and no longer) for the data to become visible: - setup helpers (`generateTestSqlDataSet`, `createIndexWithNestType`, `createIndexWithFullType`, `createTestIndexWithData`, `testCatalog`) now poll until the bulked documents are visible instead of sleeping a fixed time; - post-job verification (`testElasticsearchWithVector`, `testElasticsearchWithFullType`, `testElasticsearchWithSchema`, `testElasticsearchWithPIT`, `testElasticsearchWithNestSchema`, `testElasticsearchWithoutSchema`, `testElasticsearchWithMultiSink`, `testElasticsSearchWithMultiSourceByFilter`, `testCatalog`) polls `untilAsserted` with the same expected values as before; - the two `LockSupport.parkNanos` waits in `testElasticsSearchWithMultiSourceByFilter` are covered by the same polling block. ## Verification - `./mvnw spotless:apply` - `./mvnw -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-elasticsearch-e2e -am -DskipTests package` No assertion / expected value was changed — only how long and how often the test waits before evaluating them. -- 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]
