You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: add shared pubsub test fixtures and wait_for polling helper (#1298)
* refactor: add shared pubsub test fixtures and wait_for polling helper (#378)
* refactor: simplify gossipsub_nodes function signature
* Update tests/core/pubsub/conftest.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: address review feedback from acul71
- wait_for(): use inspect.isawaitable(result) instead of
inspect.iscoroutinefunction(predicate) so lambdas returning
coroutines are properly awaited (prevents false positives and
"coroutine was never awaited" warnings)
- subscribed_mesh: add TODO(#378) on settle_time sleep
- add newsfragments/378.internal.rst for towncrier
* test(pubsub): add strict option to connected_gossipsub_nodes
Default behaviour is unchanged: each node waits for exactly one expected
neighbour after dense_connect, which keeps the fixture fast for the
common case. Pass strict=True to wait until every node has observed
every other expected peer, for topology-sensitive tests that assert
exact peer counts or full fanout.
Addresses acul71's minor improvement on PR #1298.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: acul71 <34693171+acul71@users.noreply.github.com>
Add shared pubsub test fixtures (``GossipSubHarness``, ``gossipsub_nodes``, ``connected_gossipsub_nodes``, ``subscribed_mesh``) and reusable polling helpers (``wait_for``, ``wait_for_convergence``) to support the pubsub test suite refactor.
0 commit comments