Skip to content

TEST: wait for independent converter send completion - #3220

Merged
Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
richlundeen:merge-queue-fix/converter-instance-test-20261015
Oct 17, 2026
Merged

Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
richlundeen:merge-queue-fix/converter-instance-test-20261015

Conversation

@richlundeen

@richlundeen Richard Lundeen (richlundeen) commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Wait for the independent message send to complete in test_converter_protection_is_per_instance_async instead of cancelling it after three seconds. The existing 10-second class watchdog remains unchanged.

The independent send uses real SQLite storage. Its completion time is not the property under test. The shared converter stays blocked until the independent send completes, and the test still checks that only one shared-converter invocation has entered and both shared-instance sends remain pending. The final completion and resource-cleanup assertions are unchanged. No production behavior changes.

The historical CI failure occurred at asyncio.wait_for(peer.add_message_async(...), timeout=3), not at a concurrency assertion. Example: merge-group run 38624189549, attempt 1, build_and_test, main-job (macos-latest, 3.11, pyrit, dev_all), step Run unit tests. The failing case was tests/unit/backend/test_message_send_service.py::TestConcurrentMessages::test_converter_protection_is_per_instance_async[request], with TimeoutError. The same failure also occurred on a push to main. The traceback identifies the deadline that failed, but does not establish the underlying cause of the delay.

Merged main at 8283aaccd99ac6969aef5933d2bf57a8d534fee8 into this branch in ba3bc3e7232fccbf059d5e07153534aeec9d82b6. The diff against that main revision remains one insertion and three deletions in this test file.

This fix is still needed after #3268: that PR was narrowed before merging, and its final changes do not touch this test or its three-second wait. Earlier PRs #3011 and #3015 changed other message-send tests; #3203 changed a shared completion helper that this wait does not use.

Category: test-defect.

merge-queue-fix fingerprint: tests/unit/backend/test_message_send_service.py::TestConcurrentMessages::test_converter_protection_is_per_instance_async

Tests and Documentation

Validation of the merged change on Windows with Python 3.12.13:

  • uv run --frozen --no-sync python -m pytest -n 4 --dist=loadfile tests\unit\backend\test_message_send_service.py tests\unit\backend\test_manual_send_scheduler.py -q: 198 passed.
  • uv run --frozen --no-sync ruff check tests\unit\backend\test_message_send_service.py: passed.
  • uv run --frozen --no-sync ruff format --check tests\unit\backend\test_message_send_service.py: passed, one file already formatted.
  • uv run --frozen --no-sync ty check --output-format concise tests\unit\backend\test_message_send_service.py: passed.
  • git diff --cached --check before committing the merge: passed.
  • The commit-time pre-commit hooks also passed for the merge's checked files; non-applicable hooks were skipped. This was not an all-files pre-commit run.

The original macOS CI failure was not reproduced locally. The full unit suite, all-files pre-commit, and macOS execution were not rerun for this merge. New-head CI results are separate from the earlier head's results.

The existing regression test is updated; no product documentation changes are required. JupyText is not applicable because no notebooks or executable documentation samples changed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 18f4b401-48f9-4728-995f-db1431157452
@richlundeen
Richard Lundeen (richlundeen) marked this pull request as ready for review October 15, 2026 16:00
@richlundeen Richard Lundeen (richlundeen) changed the title [DRAFT] TEST: wait for independent converter send completion TEST: wait for independent converter send completion Oct 15, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b295a028-f94c-44a6-bf9e-818291c413cc
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 17, 2026
Merged via the queue into microsoft:main with commit 4ba6266 Oct 17, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants