Skip to content

Commit

Permalink
test: Increase timeout of live attach-interface calls
Browse files Browse the repository at this point in the history
This also requires cooperation from the host OS, and sometimes times out
with the default timeout.
  • Loading branch information
martinpitt committed Nov 7, 2023
1 parent 07c4206 commit 1b57fd3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/check-machines-nics
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class TestMachinesNICs(VirtualMachinesCase):
self.deleteIface(1)

# Test add network
m.execute("virsh attach-interface --domain subVmTest1 --type network --source default --target vnet1 --model virtio --mac 52:54:00:4b:73:5f --config --live")
m.execute("virsh attach-interface --domain subVmTest1 --type network --source default --target vnet1"
"--model virtio --mac 52:54:00:4b:73:5f --config --live", timeout=300)

b.wait_in_text("#vm-subVmTest1-network-1-type", "network")
b.wait_in_text("#vm-subVmTest1-network-1-source", "default")
Expand All @@ -76,7 +77,8 @@ class TestMachinesNICs(VirtualMachinesCase):
b.wait_in_text("#vm-subVmTest1-network-1-state", "up")

# Test bridge network
m.execute("virsh attach-interface --domain subVmTest1 --type bridge --source virbr0 --model virtio --mac 52:54:00:4b:73:5e --config --live")
m.execute("virsh attach-interface --domain subVmTest1 --type bridge --source virbr0 --model virtio"
"--mac 52:54:00:4b:73:5e --config --live", timeout=300)

# vNICs are alphabetically sorted by MAC address, so now the new vNIC is first in the list
b.wait_in_text("#vm-subVmTest1-network-1-type", "bridge")
Expand Down Expand Up @@ -110,7 +112,8 @@ class TestMachinesNICs(VirtualMachinesCase):

m.execute("virsh start subVmTest1")
# Attach vNIC only to live config
m.execute("virsh attach-interface --domain subVmTest1 --type network --source default --model virtio --mac 52:54:00:4b:73:6f --live")
m.execute("virsh attach-interface --domain subVmTest1 --type network --source default --model virtio"
"--mac 52:54:00:4b:73:6f --live", timeout=300)
b.wait_in_text("#vm-subVmTest1-network-3-mac", "52:54:00:4b:73:6f")
# vNIC which is only attached to live config cannot be edited
b.wait_visible("#vm-subVmTest1-network-3-edit-dialog[aria-disabled=true]")
Expand Down

0 comments on commit 1b57fd3

Please sign in to comment.