Skip to content

Commit

Permalink
Merge branch 'main' into taegyunkim/ci-resource-limits
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyunkim authored Nov 21, 2024
2 parents 0353375 + d5ac5f9 commit 059f0ae
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/profiling_v2/test_gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ def debug_print(*args):

def _run_gunicorn(*args):
cmd = (
["ddtrace-run", "gunicorn", "--bind", "127.0.0.1:7644", "--chdir", os.path.dirname(__file__)]
[
"ddtrace-run",
"gunicorn",
"--bind",
"127.0.0.1:7644",
"--worker-tmp-dir",
"/dev/shm",
"--chdir",
os.path.dirname(__file__),
]
+ list(args)
+ ["tests.profiling.gunicorn-app:app"]
)
Expand Down Expand Up @@ -75,6 +84,9 @@ def _test_gunicorn(gunicorn, tmp_path, monkeypatch, *args):
response = f.read().decode()
debug_print(response)
except Exception as e:
proc.terminate()
output = proc.stdout.read().decode()
print(output)
pytest.fail("Failed to make request to gunicorn server %s" % e)
finally:
# Need to terminate the process to get the output and release the port
Expand Down

0 comments on commit 059f0ae

Please sign in to comment.