fresh-borzoni commented on code in PR #564:
URL: https://github.com/apache/fluss-rust/pull/564#discussion_r3307336677
##########
crates/fluss/tests/integration/utils.rs:
##########
@@ -100,6 +101,94 @@ pub async fn create_table(
.expect("Failed to create table");
}
+const READINESS_TIMEOUT: Duration = Duration::from_secs(30);
+const READINESS_POLL_INTERVAL: Duration = Duration::from_millis(200);
+
+/// Waits until the default bucket of a non-partitioned table can serve offset
requests.
+///
+/// Newly-created tables may not have bucket leaders immediately. Polling list
offsets avoids
+/// fixed sleeps that are either flaky on slow CI or waste time when the
cluster is ready sooner.
+pub async fn wait_for_table_ready(admin: &FlussAdmin, table_path: &TablePath) {
+ wait_for_table_buckets_ready(admin, table_path, &[0]).await;
Review Comment:
it's not redundant with wait_for_table_ready - it's a strictly stronger
check, and the 2-bucket test(until_offsets_multi_bucket) needs exactly that
strength because list_offsets fails fast on any bucket whose leader isn't ready
yet.
--
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]