zhangshenghang opened a new pull request, #12643: URL: https://github.com/apache/seatunnel/pull/12643
## Purpose of the pull request `ElasticsearchAuthIT` uses fixed `Thread.sleep(2000)` waits after bulk inserts and after job execution before reading document counts. When Elasticsearch index refresh is slower than 2s under CI load, the following assertions (`docCount > 0`, `targetCount > 0`) see stale data and the tests fail intermittently. This PR replaces the fixed sleeps with bounded `Awaitility` polling while keeping every assertion unchanged: - `insertTestData` / `setupAuthTestData` poll until the bulked documents are visible before the tests (and the SeaTunnel job) read the index; - the two E2E tests (`testE2EApiKeyAuthSourceAndSink`, `testE2EApiKeyEncodedAuthSourceAndSink`) poll `untilAsserted` for the target-index document count with the same expected condition (`> 0`) as before. ## 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]
