From 2969ceaa6447774f921fe7dd06a39c175e87e45c Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Tue, 7 Dec 2021 11:14:13 -0700 Subject: mock sleep() in azure test (#1137) --- tests/unittests/sources/test_azure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unittests/sources/test_azure.py b/tests/unittests/sources/test_azure.py index b221a0d7..9728a1e7 100644 --- a/tests/unittests/sources/test_azure.py +++ b/tests/unittests/sources/test_azure.py @@ -2981,7 +2981,8 @@ class TestPreprovisioningHotAttachNics(CiTestCase): m_is_up.side_effect = is_up_mock - dsa.wait_for_link_up("eth0") + with mock.patch('cloudinit.sources.DataSourceAzure.sleep'): + dsa.wait_for_link_up("eth0") self.assertEqual(2, m_try_set_link_up.call_count) self.assertEqual(2, m_is_up.call_count) -- cgit v1.2.3