[tests] replace fixed tokio::time::sleep workarounds with wait_for_table_ready helper.#564
[tests] replace fixed tokio::time::sleep workarounds with wait_for_table_ready helper.#564slfan1989 wants to merge 2 commits into
Conversation
…ble_ready helper.
fresh-borzoni
left a comment
There was a problem hiding this comment.
@slfan1989 Ty for the PR, LGTM overall, minor comment
nit: these three wait_for_* loops (+ wait_for_cluster_ready_with_sasl) are the same poll-until-timeout skeleton copy-pasted, differing only in the probe. Could pull out a small poll_until(timeout, interval, || probe) helper - basically the Rust version of Java's CommonTestUtils.waitUtil/waitValue.
Not blocking, just a thought since we're here.
…ble_ready helper.
Thanks for the suggestion! Updated. I factored out the shared poll-until-timeout skeleton into a small |
fresh-borzoni
left a comment
There was a problem hiding this comment.
@slfan1989 Thank you for the contribution, LGTM 👍
@charlesdong1991 all good from your side?
Purpose
Linked issue: close #562
This PR replaces fixed
tokio::time::sleepworkarounds in Rust integration tests with polling-based readiness helpers. This makes the tests less brittle on slow CI and avoids unnecessary waiting when the table or partition bucket leaders are ready earlier.Brief change log
wait_for_table_readywait_for_table_buckets_readywait_for_partitions_readywait_for_partition_readywait_for_partition_buckets_readyTests
Exists Test.
API and Format
No.
Documentation
No.