Skip to content

Commit 0952a22

Browse files
committed
fix(test): eliminate sleep-based "wait for vm boot"
Microvms that have a network interface added to it will automatically use ssh to wait for bootup, so use this to replace the 500ms sleep that was not enough in some cases, leading to RuntimeError: ('Balloon config error: Error creating the balloon device: Device not activated yet.', {'fault_message': 'Balloon config error: Error creating the balloon device: Device not activated yet.'}, <Response [400]>) errors on the subsequent PATCH. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 140db4b commit 0952a22

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/integration_tests/functional/test_api.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import platform
99
import re
1010
import resource
11-
import time
1211
from pathlib import Path
1312

1413
import packaging.version
@@ -1020,12 +1019,9 @@ def test_api_balloon(uvm_nano):
10201019
)
10211020

10221021
# Start the microvm.
1022+
test_microvm.add_net_iface()
10231023
test_microvm.start()
10241024

1025-
# Give the balloon driver time to initialize.
1026-
# 500 ms is the maximum acceptable boot time.
1027-
time.sleep(0.5)
1028-
10291025
# But updating should be OK.
10301026
test_microvm.api.balloon.patch(amount_mib=4)
10311027

0 commit comments

Comments
 (0)