mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix when qemu exit by itself clean other processes
Fix https://github.com/GNS3/gns3-gui/issues/1898
This commit is contained in:
3 files changed
+6
-7
No files matched your search
@@ -144,7 +144,7 @@ def test_termination_callback(vm, async_run):
|
||||
vm.status = "started"
|
||||
|
||||
with NotificationManager.instance().queue() as queue:
|
||||
vm._termination_callback(0)
|
||||
async_run(vm._termination_callback(0))
|
||||
assert vm.status == "stopped"
|
||||
|
||||
async_run(queue.get(0)) # Ping
|
||||
@@ -163,10 +163,10 @@ def test_termination_callback_error(vm, tmpdir, async_run):
|
||||
vm._stdout_file = str(tmpdir / "qemu.log")
|
||||
|
||||
with NotificationManager.instance().queue() as queue:
|
||||
vm._termination_callback(1)
|
||||
async_run(vm._termination_callback(1))
|
||||
assert vm.status == "stopped"
|
||||
|
||||
async_run(queue.get(0)) # Ping
|
||||
async_run(queue.get(0)) # Ping
|
||||
|
||||
(action, event, kwargs) = queue.get_nowait()
|
||||
assert action == "node.updated"
|
||||
|
||||
Reference in new issue
Block a user