Skip to content

Commit 7d2faae

Browse files
committed
fix(test): cleanup vm for process start
We are generating multiple vms in a loop however the factory holds onto a reference to these so are not killed as they go out of scope. Explicitly kill the vm after each loop. Signed-off-by: Jack Thomson <jackabt@amazon.com>
1 parent 2d815e7 commit 7d2faae

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/integration_tests/performance/test_process_startup_time.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def test_startup_time_new_pid_ns(
2323
microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs)
2424
microvm.jailer.new_pid_ns = True
2525
_test_startup_time(microvm, metrics, "new_pid_ns")
26+
microvm.kill()
2627

2728

2829
@pytest.mark.nonci
@@ -35,6 +36,7 @@ def test_startup_time_daemonize(
3536
for _ in range(ITERATIONS):
3637
microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs)
3738
_test_startup_time(microvm, metrics, "daemonize")
39+
microvm.kill()
3840

3941

4042
@pytest.mark.nonci
@@ -48,6 +50,7 @@ def test_startup_time_custom_seccomp(
4850
microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs)
4951
_custom_filter_setup(microvm)
5052
_test_startup_time(microvm, metrics, "custom_seccomp")
53+
microvm.kill()
5154

5255

5356
def _test_startup_time(microvm, metrics, test_suffix: str):

0 commit comments

Comments
 (0)