mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user