Skip to content

Commit 12fbed3

Browse files
author
rsora
committed
Set SIGTERM as kill signal in case of win platform to overcome pyinvoke bug
1 parent 398db3a commit 12fbed3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/test_daemon.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# a commercial license, send an email to license@arduino.cc.
1515

1616
import os
17+
import signal
1718
import time
19+
from sys import platform
1820

1921
import pytest
2022
import requests
@@ -39,5 +41,8 @@ def test_telemetry_prometheus_endpoint(daemon_runner, data_dir):
3941
sample = family.samples[0]
4042
assert repertory["installation"]["id"] == sample.labels["installationID"]
4143

42-
# Kill the runner's process as we finished our test
43-
daemon_runner.kill()
44+
# Kill the runner's process as we finished our test (platform dependent)
45+
os_signal = signal.SIGKILL
46+
if platform.system() == "Windows":
47+
os_signal = signal.SIGTERM
48+
os.kill(daemon_runner.pid, os_signal)

0 commit comments

Comments
 (0)