Skip to content

Commit

Permalink
test: Avoid eternal hang in test_one_wifi_with_accesspoints
Browse files Browse the repository at this point in the history
Our NM mock is currently broken with `nmcli` >= 1.49.3, see #216.

Turn the eternal hang into a failure.
  • Loading branch information
martinpitt committed Aug 25, 2024
1 parent ed813da commit f73164a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_networkmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ def test_one_wifi_with_accesspoints(self):
self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+--")

# connect to existing wifi with password
subprocess.check_call(["nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"])
subprocess.check_call(
["timeout", "--signal=KILL", "5", "nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"]
)
self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+AP_3")

# connect to existing wifi without password
Expand Down

0 comments on commit f73164a

Please sign in to comment.