MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / wait_for_active

Function wait_for_active

tests/rust/src/test_base.rs:362–374  ·  view source on GitHub ↗

Poll DescribeTable until ACTIVE (up to 60s).

(c: &Client, name: &str)

Source from the content-addressed store, hash-verified

360
361/// Poll DescribeTable until ACTIVE (up to 60s).
362pub async fn wait_for_active(c: &Client, name: &str) {
363 for _ in 0..60 {
364 if let Ok(resp) = c.describe_table().table_name(name).send().await {
365 if let Some(table) = resp.table() {
366 if table.table_status() == Some(&TableStatus::Active) {
367 return;
368 }
369 }
370 }
371 tokio::time::sleep(Duration::from_secs(1)).await;
372 }
373 panic!("Table {name} did not become ACTIVE within 60s");
374}
375
376/// Poll DescribeTable until the table no longer exists (up to 60s).
377pub async fn wait_for_deleted(c: &Client, name: &str) {

Callers 15

create_on_demand_tableFunction · 0.70
create_provisioned_tableFunction · 0.70
create_tagged_tableFunction · 0.70
create_simple_tableFunction · 0.70
create_composite_tableFunction · 0.70
scan_with_select_countFunction · 0.70
create_table_rawFunction · 0.70
create_ttl_tableFunction · 0.70
create_and_seedFunction · 0.70
scan_empty_tableFunction · 0.70
delete_existing_tableFunction · 0.70
delete_table_twiceFunction · 0.70

Calls 2

table_nameMethod · 0.80
describe_tableMethod · 0.80

Tested by

no test coverage detected