Skip to content

Commit 7e667a7

Browse files
committed
test_feedback_handler_http: wait for detached process
1 parent ee2e30b commit 7e667a7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tests/test_integration_http.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,21 @@ def test_user_report_http(cmake, httpserver):
220220
def test_feedback_handler_http(cmake, httpserver, build_args):
221221
tmp_path = cmake(["sentry_example", "sentry_feedback"], build_args)
222222

223-
httpserver.expect_request(
223+
httpserver.expect_oneshot_request(
224224
"/api/123456/envelope/",
225225
headers={"x-sentry-auth": auth_header},
226226
).respond_with_data("OK")
227-
env = dict(os.environ, SENTRY_DSN=make_dsn(httpserver))
228227

229-
child = run(
230-
tmp_path,
231-
"sentry_example",
232-
["log", "install-feedback-handler", "crash"],
233-
env=env,
234-
)
235-
assert child.returncode # well, it's a crash after all
228+
with httpserver.wait(timeout=10) as waiting:
229+
env = dict(os.environ, SENTRY_DSN=make_dsn(httpserver))
230+
child = run(
231+
tmp_path,
232+
"sentry_example",
233+
["log", "install-feedback-handler", "crash"],
234+
env=env,
235+
)
236+
assert child.returncode # well, it's a crash after all
237+
assert waiting.result
236238

237239
assert len(httpserver.log) == 1
238240
output = httpserver.log[0][0].get_data()

0 commit comments

Comments
 (0)