test.py: remove setsid from the framework

With previous architecture, scylla servers were handled by test.py and
if pytest fails, test.py was responsible for stopping scylla processes.
Now with only pytest handling, there is no such mechanism, that's why
I'm removing the setsid, so when the parent pytest process closes it
will automatically close all child including any started process during
testing. This will allow to not leave any scylla process in case pytest
was killed.
This commit is contained in:
Andrei Chekun
2026-02-03 11:25:50 +01:00
parent d3f5f7468c
commit d9ce2db1a3
2 changed files with 1 additions and 3 deletions

View File

@@ -119,7 +119,7 @@ class ResourceGather(ABC):
pass
def put_process_to_cgroup(self) -> None:
os.setsid()
pass
def get_test_metrics(self) -> Metric:
pass
@@ -197,7 +197,6 @@ class ResourceGatherOn(ResourceGather):
self.sqlite_writer.write_row(metrics, METRICS_TABLE)
def put_process_to_cgroup(self) -> None:
super().put_process_to_cgroup()
try:
pid = os.getpid()
with open(self.cgroup_path / 'cgroup.procs', "a") as cgroup:

View File

@@ -823,7 +823,6 @@ class ScyllaServer:
stderr=self.log_file,
stdout=self.log_file,
env=env,
preexec_fn=os.setsid,
)
if expected_server_up_state == ServerUpState.PROCESS_STARTED: