From 834a554fea9ea0b2e19a9f4101117c7fcd08e1be Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 27 Apr 2015 10:14:46 +0200 Subject: [PATCH] Fix VPCS tests --- tests/modules/vpcs/test_vpcs_vm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/modules/vpcs/test_vpcs_vm.py b/tests/modules/vpcs/test_vpcs_vm.py index 693da5f8..352cb943 100644 --- a/tests/modules/vpcs/test_vpcs_vm.py +++ b/tests/modules/vpcs/test_vpcs_vm.py @@ -97,7 +97,8 @@ def test_stop(loop, vm): loop.run_until_complete(asyncio.async(vm.start())) assert vm.is_running() - loop.run_until_complete(asyncio.async(vm.stop())) + with asyncio_patch("gns3server.utils.asyncio.wait_for_process_termination"): + loop.run_until_complete(asyncio.async(vm.stop())) assert vm.is_running() is False process.terminate.assert_called_with() @@ -117,7 +118,9 @@ def test_reload(loop, vm): vm.port_add_nio_binding(0, nio) loop.run_until_complete(asyncio.async(vm.start())) assert vm.is_running() - loop.run_until_complete(asyncio.async(vm.reload())) + + with asyncio_patch("gns3server.utils.asyncio.wait_for_process_termination"): + loop.run_until_complete(asyncio.async(vm.reload())) assert vm.is_running() is True process.terminate.assert_called_with()