@@ -60,6 +60,9 @@ async def test_create_qemu_instance(mocker):
60
60
mocker .patch .object (settings , "ENABLE_CONFIDENTIAL_COMPUTING" , False )
61
61
mocker .patch .object (settings , "USE_JAILER" , False )
62
62
63
+ # Patch journal.stream so the output of qemu proecss is shown in the test output
64
+ mocker .patch ("aleph.vm.hypervisors.qemu.qemuvm.journal.stream" , return_value = None )
65
+
63
66
if not settings .FAKE_INSTANCE_BASE .exists ():
64
67
pytest .xfail (
65
68
"Test Runtime not setup. run `cd runtimes/instance-rootfs && sudo ./create-debian-12-qemu-disk.sh`"
@@ -102,6 +105,7 @@ async def test_create_qemu_instance(mocker):
102
105
qemu_execution , process = await mock_systemd_manager .enable_and_start (execution .controller_service )
103
106
assert isinstance (qemu_execution , QemuVM )
104
107
assert qemu_execution .qemu_process is not None
108
+ await asyncio .sleep (30 )
105
109
await mock_systemd_manager .stop_and_disable (execution .vm_hash )
106
110
await qemu_execution .qemu_process .wait ()
107
111
assert qemu_execution .qemu_process .returncode is not None
@@ -121,6 +125,9 @@ async def test_create_qemu_instance_online(mocker):
121
125
mocker .patch .object (settings , "ENABLE_CONFIDENTIAL_COMPUTING" , False )
122
126
mocker .patch .object (settings , "USE_JAILER" , False )
123
127
128
+ # Patch journal.stream so the output of qemu process is shown in the test output
129
+ mocker .patch ("aleph.vm.hypervisors.qemu.qemuvm.journal.stream" , return_value = None )
130
+
124
131
if not settings .FAKE_INSTANCE_BASE .exists ():
125
132
pytest .xfail (
126
133
"Test instance disk {} not setup. run `cd runtimes/instance-rootfs && sudo ./create-debian-12-qemu-disk.sh` " .format (
0 commit comments