test(e2e): cfg-gate local-only tests so unfiltered --features qanet doesn't hang - #2010
test(e2e): cfg-gate local-only tests so unfiltered --features qanet doesn't hang#2010wbaxterh wants to merge 3 commits into
Conversation
…oesn't hang The e2e crate defaults to `local-ci` and the qanet/devnet nightly runs filtered to `cnight::observation::`, so CI is unaffected. But an unfiltered `cargo test --no-default-features --features qanet` runs the local-env-only tests (operational, contract_state, governance, c2m_bridge, and the non-observation cnight test), which call `ensure_dev_wallet_funded()` / the local faucet stack and hang ~180s. Gate those modules and the local cnight test behind `any(feature = "local", feature = "local-dev", feature = "local-ci")`, leaving only `cnight::observation::` ungated. A scoped `allow(dead_code, unused_imports)`, active only when no local feature is set, keeps the qanet build warning-clean since the dev-wallet and deploy helpers in lib.rs are then unused. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: wbaxterh <wesleybaxterhuber@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96467da121
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[cfg(any(feature = "local", feature = "local-dev", feature = "local-ci"))] | ||
| mod operational; |
There was a problem hiding this comment.
Keep remote operational smoke tests in qanet builds
When only qanet or devnet is enabled, this gate removes the entire operational module before its own remote-only dust_balance_smoke and dust_balance_smoke_many tests can be selected (they are explicitly gated for those features in tests/e2e/tests/operational.rs). Consequently, the documented qanet commands in tests/e2e/README.md that run these ignored tests now match zero tests and can succeed without verifying the Postgres fetch-cache path; keep the module compiled and cfg-gate only its local-only tests instead.
Useful? React with 👍 / 👎.
change file Signed-off-by: wbaxterh <wesleybaxterhuber@gmail.com>
The initial cfg-gate put the whole `operational` module behind the local features, which also removed its qanet/devnet-only `dust_balance_smoke` / `dust_balance_smoke_many` tests (the Postgres fetch-cache smoke tests) from qanet builds, so the README's `--features qanet --ignored dust_balance_smoke` commands matched zero tests. Flagged by the Codex review. Ungate the `operational` module and cfg-gate only its three local-only tests (valid_deploy_transaction_succeeds_via_rpc, toolkit_multi_dest_send_does_not_hang, consolidate_faucet) instead, so the qanet smoke tests stay compiled. Verified with `cargo test --test e2e_tests -- --list`: - --features qanet: 14 tests (12 cnight::observation + 2 operational smoke) - --features local-ci: 31 tests, unchanged Assisted-by: Claude:claude-opus-4-8 Signed-off-by: wbaxterh <wesleybaxterhuber@gmail.com>
|
Good catch, thank you. Fixed in 4a94e56: I ungated the Verified with
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a94e56f25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| // Local-env-only (drives the local faucet); gated to the local features. | ||
| #[cfg(any(feature = "local", feature = "local-dev", feature = "local-ci"))] |
There was a problem hiding this comment.
Preserve remote faucet consolidation
Remove this local-only gate from the ignored cleanup task. When an operator runs cargo test --no-default-features --features devnet --test e2e_tests -- --ignored consolidate_faucet (or uses qanet), the filter now matches zero tests, even though Settings configures the remote Ogmios endpoint and funded wallet for those features and the task only operates through those settings. Because the test is already #[ignore], it could not contribute to the unfiltered-run hang this change addresses; gating it only removes the on-demand cleanup path for the persistent shared faucet.
Useful? React with 👍 / 👎.
Overview
Closes #1842.
The e2e crate's default feature is
local-ci, and the qanet/devnet nightly job runs filtered tocnight::observation::, so this is not a CI problem. But an unfilteredcargo test --no-default-features --features qanetcompiles and runs the local-env-only tests (operational,contract_state,governance,c2m_bridge, and the non-observationcnighttest), which callensure_dev_wallet_funded()/ the local faucet stack and hang ~180s each.This gates the local-only test modules and the single local
cnighttest behind#[cfg(any(feature = "local", feature = "local-dev", feature = "local-ci"))], leaving onlycnight::observation::ungated (the set meant to run under both local and qanet). The per-feature test sets are now coherent: under--features qanetthe binary contains only the qanet-relevant tests.Two notes on scope:
c2m_bridgeis gated as well. The ticket enumerated the four hanging modules;c2m_bridgeis likewise local-env-only (it drives the local faucet viaglobal_faucet_manager), so it would also run under an unfiltered qanet build. Flagging in case you'd rather keep it out of this change.lib.rsunused under qanet. Rather than cfg-gate ~20 helpers individually, a single scoped# keeps the qanet build warning-clean. Happy to switch to per-helper gating if you prefer that.🗹 TODO before merging
📌 Submission Checklist
git commit -s) for the DCO🧪 Testing Evidence
Verified with
cargo test -p midnight-node-e2e --no-default-features --features <FEAT> --test e2e_tests -- --list(lists tests without running them):--features qanet→ 12 tests, all undercnight::observation::. The local-only modules are no longer compiled in, so an unfiltered qanet run can't hang on them. (Before this change they were listed and would each block ~180s inensure_dev_wallet_funded.)--features local-ci(default) → 31 tests, full set unchanged:c2m_bridge(4),cnight(14 = 13observation+alice_cannot_deregister_bob),contract_state(3),governance(7),operational(3).Both feature builds are warning-clean from this change. The only warnings emitted are pre-existing and untouched here: a
cranelift-wasmdev-profile spec note, and an unusedselfimport incnight/observation.rs.🔱 Fork Strategy
Links
Closes #1842