test: reduce macOS integration flakiness#5135
test: reduce macOS integration flakiness#5135eval-exec wants to merge 1 commit intonervosnetwork:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes two sources of macOS CI integration test flakiness. TransactionRelayConflict was checking .transaction.is_some() which can be false even after the transaction is accepted into the tx pool — this is replaced with a tx status check. SyncChurn was timing out on slower non-Linux runners, so a configurable timeout mechanism is introduced with a longer value for non-Linux platforms.
Changes:
- Introduced
waiting_for_sync_with_timeoutintest/src/node.rsto allow callers to specify a custom sync timeout, while keeping the existingwaiting_for_syncas a 120-second-default wrapper. - Updated
SyncChurnto use platform-specific sync timeouts (120s for Linux, 240s for non-Linux). - Switched
TransactionRelayConflictrelay assertions from checkingtransaction.is_some()to checkingtx_status.statusforPending | Proposed, which more reliably reflects the intended pool membership check.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/src/node.rs |
Adds waiting_for_sync_with_timeout function; refactors waiting_for_sync to delegate to it with default timeout |
test/src/specs/sync/sync_churn.rs |
Adds platform-specific SYNC_TIMEOUT_SECS constants and uses the new timeout-aware sync function |
test/src/specs/relay/transaction_relay.rs |
Replaces .transaction.is_some() checks with tx_status.status pattern matching against `Pending |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8d9a389 to
8cf5649
Compare
8cf5649 to
187a54c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
test/src/specs/relay/transaction_relay.rs:335
- This assertion message refers to relaying to node1, but the condition being waited on is that
node0seestx2(re-broadcast fromnode1). Update the message to match the actual direction/target to avoid confusing failures.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
187a54c to
7cac12b
Compare
What problem does this PR solve?
Problem Summary:
Reduce flaky macOS integration failures in
TransactionRelayConflictandSyncChurn.What is changed and how it works?
What's Changed:
TransactionRelayConflictSyncChurnRelated changes
Check List
Tests
Manual test:
TransactionRelayConflictSyncChurn