Repository navigation
e2e: replace timing waits with bounded synchronization - #1253
Merged
Merged
Conversation
Carter Tinney (cartertinney)
force-pushed
the
agents/e2e-test-stability
branch
from
September 1, 2026 13:17
6589563 to
43fe9b6
Compare
Ewerton Scaboro da Silva (ewertons)
approved these changes
Sep 1, 2026
Copilot started reviewing on behalf of
Carter Tinney (cartertinney)
September 1, 2026 16:23
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Builds on #1252 by replacing fragile IoT Hub E2E timing waits with bounded synchronization and safer Event Hub lifecycle handling.
Changes:
- Adds bounded sync/async wait helpers and daemon-backed operations.
- Improves Event Hub readiness, filtering, startup position, and shutdown.
- Replaces fixed sleeps and unbounded waits across E2E tests.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/e2e/iothub_e2e/wait_helpers.py |
Adds bounded polling helpers. |
tests/e2e/iothub_e2e/test_wait_helpers.py |
Tests polling and timeout behavior. |
tests/e2e/iothub_e2e/test_service_helper.py |
Tests Event Hub lifecycle behavior. |
tests/e2e/iothub_e2e/sync/test_sync_twin.py |
Bounds twin synchronization waits. |
tests/e2e/iothub_e2e/sync/test_sync_send_message.py |
Bounds sends and filters telemetry. |
tests/e2e/iothub_e2e/sync/test_sync_sas_renewal.py |
Bounds renewal event waits. |
tests/e2e/iothub_e2e/sync/test_sync_methods.py |
Removes redundant subscription sleep. |
tests/e2e/iothub_e2e/sync/test_sync_connect_disconnect.py |
Bounds connection-state waits. |
tests/e2e/iothub_e2e/sync/test_sync_c2d.py |
Bounds C2D receipt waits. |
tests/e2e/iothub_e2e/sync/conftest.py |
Adds readiness and guaranteed shutdown. |
tests/e2e/iothub_e2e/drop_fixtures.py |
Removes import-time network mutation. |
tests/e2e/iothub_e2e/const.py |
Defines the shared E2E timeout. |
tests/e2e/iothub_e2e/conftest.py |
Adds daemon-thread execution fixture. |
tests/e2e/iothub_e2e/aio/test_twin.py |
Bounds asynchronous twin waits. |
tests/e2e/iothub_e2e/aio/test_twin_stress.py |
Adds deadlines to stress synchronization. |
tests/e2e/iothub_e2e/aio/test_send_message.py |
Bounds sends and filters telemetry. |
tests/e2e/iothub_e2e/aio/test_sas_renewal.py |
Bounds renewal event waits. |
tests/e2e/iothub_e2e/aio/test_methods.py |
Removes redundant subscription sleep. |
tests/e2e/iothub_e2e/aio/test_connect_disconnect.py |
Bounds connection-state waits. |
tests/e2e/iothub_e2e/aio/test_c2d.py |
Bounds C2D receipt waits. |
tests/e2e/iothub_e2e/aio/conftest.py |
Adds readiness and guaranteed shutdown. |
dev_utils/dev_utils/service_helper.py |
Exposes async readiness and filtering. |
dev_utils/dev_utils/service_helper_sync.py |
Implements Event Hub lifecycle synchronization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Avishek (avishekpant)
approved these changes
Sep 1, 2026
Carter Tinney (cartertinney)
force-pushed
the
agents/e2e-test-stability
branch
from
September 1, 2026 17:26
18b1995 to
8c51085
Compare
Avishek (avishekpant)
approved these changes
Sep 1, 2026
stack merge was automatically disabled
September 1, 2026 18:56
Pull Request is not mergeable
stack merge was automatically disabled
September 1, 2026 19:22
Pull Request is not mergeable
Carter Tinney (cartertinney)
force-pushed
the
agents/e2e-test-stability
branch
from
September 1, 2026 19:29
8c51085 to
a778c63
Compare
Base automatically changed from
agents/unit-test-failure-analysis-python312
to
main
September 1, 2026 19:29
Use explicit condition, event, and future deadlines instead of fixed sleeps and unbounded polling. Signal Event Hub readiness from an active receive cycle, guarantee fixture cleanup, and use a daemon-backed receiver so shutdown timeouts cannot be bypassed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The service helper imports Azure IoT Hub service dependencies that are intentionally absent from unit-test jobs. Move its focused tests under the E2E suite while keeping them runnable without E2E fixtures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Provide the daemon-thread fixture within the E2E test root and start Event Hub consumption from the helper construction timestamp. This preserves events for partitions that attach later without replaying prior async-test traffic into sync tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow Event Hub waits without message IDs to filter arrivals, so delayed telemetry from earlier tests cannot satisfy raw-string send assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep tests for IoT Hub E2E infrastructure together under the E2E suite instead of splitting the wait-helper tests into the unit-test tree. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use one absolute deadline for each reported-property batch and create only batch_size updates per batch. This prevents unrelated patches from extending the timeout and restores the intended total update count. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use one absolute deadline per expected serial reported-property update so delayed unrelated patches cannot renew the service wait indefinitely. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Carter Tinney (cartertinney)
force-pushed
the
agents/e2e-test-stability
branch
from
September 1, 2026 19:32
a778c63 to
4b83f6c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
What changed
Validation