Fix flaky test tests/test_user_edit.py::test_accessible_project_ids_for_a_superadmin_target_is_every_project

Task 9617 · Done · Coder · created · updated

The merge lane saw `tests/test_user_edit.py::test_accessible_project_ids_for_a_superadmin_target_is_every_project` fail and then pass on a rerun of the same tree. - Test: `tests/test_user_edit.py::test_accessible_project_ids_for_a_superadmin_target_is_every_project` - Tree: `336500b9600a16cbb307ba31a69997424d5b7820` - Lane task: 9614 - Flake record: 01a16cd3-a7b9-793d-ab3f-680e2aefbf78 Make it deterministic; do not delete it unless it tests nothing. - Also flaky, same file: `tests/test_user_edit.py::test_a_group_bound_on_the_project_makes_it_accessible` (tree `336500b9600a16cbb307ba31a69997424d5b7820`, lane task 9614, flake record 01a16cd3-a8cb-71a4-ac86-d767adab1988) - Also flaky, same file: `tests/test_user_edit.py::test_no_binding_is_not_access_and_reports_an_empty_list` (tree `336500b9600a16cbb307ba31a69997424d5b7820`, lane task 9614, flake record 01a16cd3-aa8e-7d29-a678-f6b1b03c9f30) - Also flaky, same file: `tests/test_user_edit.py::test_the_reported_ids_are_exactly_what_that_user_s_own_projects_call_returns` (tree `336500b9600a16cbb307ba31a69997424d5b7820`, lane task 9614, flake record 01a16cd3-ac30-7a93-9cd2-4310b392ff97) - Also flaky, same file: `tests/test_user_edit.py::test_the_patch_response_does_not_carry_accessible_project_ids` (tree `336500b9600a16cbb307ba31a69997424d5b7820`, lane task 9614, flake record 01a16cd3-b111-7bb5-b52c-8ba7ffc29ed6)

Outcome

The 5 user_edit flakes were victims of a stopped shared TestClient portal (culprit fixed in 9620). Added a conftest guard that reopens the client and fails the culprit, plus a mechanism test. Quick gate green; PR #6804 queued in lane. Memory: used mem-25267/25268; proposed 1 gotcha.

Pull request

Artifacts

Activity

  • Ready
  • Runner started
  • Runner ended (done)