Skip to content

Commit b33d141

Browse files
committed
test/suites/waitready: use shorter timeouts
Signed-off-by: Simon Deziel <[email protected]>
1 parent 4a9a1c1 commit b33d141

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/suites/waitready.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ test_waitready() {
4444
lxc network unset "${br_name}" bridge.external_interfaces
4545
ip link del foo
4646

47-
# LXD retries starting the networks every 60s.
48-
# Wait for 80s to ensure the network is now ready but the storage pool isn't.
47+
# LXD retries starting the networks every few seconds.
48+
# Wait for 15s to ensure the network is now ready but the storage pool isn't.
4949
echo "==> Networks will appear ready after the next retry"
50-
[ "$(lxd waitready --network --storage --timeout 80 2>&1)" = "Error: Storage pools not ready yet after 80s timeout" ]
50+
[ "$(lxd waitready --network --storage --timeout 15 2>&1)" = "Error: Storage pools not ready yet after 15s timeout" ]
5151

5252
# Not setting a timeout should have the same effect and return instantly.
5353
[ "$(CLIENT_DEBUG="" SHELL_TRACING="" lxc query "/internal/ready?network=1&storage=1" 2>&1)" = "Error: Storage pools not ready yet" ]
@@ -62,11 +62,10 @@ test_waitready() {
6262
echo "==> Restore the storage pool directory"
6363
rm "${LXD_DIR}/storage-pools/${storage_pool}"
6464

65-
# LXD retries starting the storage pools every 60s.
66-
# The internal TryMount function retries 20 times over a course of 10s so we should account for this too.
67-
# Wait for 80s to ensure the storage pool is now ready too.
65+
# LXD retries starting the storage pools every few seconds.
66+
# Wait for 15s to ensure the storage pool is now ready too.
6867
echo "==> All resources will appear ready after the next retry window"
69-
lxd waitready --network --storage --timeout 80
68+
lxd waitready --network --storage --timeout 15
7069

7170
# The standard waitready without extra flags should still return with success.
7271
lxd waitready

0 commit comments

Comments
 (0)