Skip to content

Commit f6a02ce

Browse files
committed
Update test_domain and test_volume with waits
1 parent 203479b commit f6a02ce

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/integration/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,12 @@ def test_domain(test_linode_client):
310310
domain=domain_addr, soa_email=soa_email, tags=["test-tag"]
311311
)
312312

313+
def get_domain_status():
314+
domain.invalidate()
315+
return domain.status == "active"
316+
317+
wait_for_condition(3, 30, get_domain_status)
318+
313319
# Create a SRV record
314320
domain.record_create(
315321
"SRV",
@@ -333,6 +339,12 @@ def test_volume(test_linode_client):
333339

334340
volume = client.volume_create(label=label, region=region)
335341

342+
def get_volume_status():
343+
volume.invalidate()
344+
return volume.status == "active"
345+
346+
wait_for_condition(5, 45, get_volume_status)
347+
336348
yield volume
337349

338350
send_request_when_resource_available(timeout=100, func=volume.delete)

0 commit comments

Comments
 (0)