fix: add pytest to build.sh, fix hanging tests, add request timeouts

This commit is contained in:
2026-07-17 09:18:08 +03:00
parent b445449542
commit e1aa542917
4 changed files with 60 additions and 31 deletions
+6 -6
View File
@@ -82,16 +82,16 @@ class PipelineServer:
except subprocess.TimeoutExpired:
self.process.kill()
self.process.wait(timeout=5)
# Close pipes to prevent resource leaks and zombie processes
if self.process.stdout:
self.process.stdout.close()
if self.process.stderr:
self.process.stderr.close()
@pytest.fixture(scope="session")
def pipeline_server():
"""Session-scoped fixture that builds, starts, and stops the pipeline-runner server."""
project_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
build_script = os.path.join(project_dir, "build.sh")
subprocess.check_call([build_script, "--fake"], cwd=project_dir)
"""Session-scoped fixture that starts and stops the pipeline-runner server."""
work_dir = tempfile.mkdtemp(prefix="pipeline-test-")
port = get_free_port()