test(smoke): share one daemon across read-only RPC query tests (#999)#1007
Conversation
|
🤖 Claude Code Review Status: Complete SummaryThis PR successfully consolidates 8 separate read-only RPC test functions into a single parent test with subtests, reducing resource usage from 8 daemon instances + 8 Aerospike containers to just 1 of each for the group. The refactoring is well-designed and follows sound testing principles. Key Strengths
No Issues FoundThe refactoring is sound. Test isolation is preserved, shared state is read-only except for the final subtest, and all behavior is equivalent to the original implementation. |
ordishs
left a comment
There was a problem hiding this comment.
Clean, well-scoped test refactor. Verified locally:
go vet ./test/e2e/daemon/ready/...— clean- Subtest source order confirms the mutating
GetRawTransactionVerboseruns last, after all read-only subtests — state-safety claim holds - No external references (CI/Makefile/scripts/other packages) to the 8 removed test names — rename breaks nothing
- Assertions carried over 1:1 from the originals; only the read-only group consolidated
Tradeoffs are inherent to consolidation (coarser failure blast radius, finer -run granularity lost) and reasonable for read-only queries. PR description is accurate about scope vs #999/#1000.
Benchmark Comparison ReportBaseline: Current: Summary
All benchmark results (sec/op)
Threshold: >10% with p < 0.05 | Generated: 2026-06-01 15:37 UTC |
|



Summary
Collapses the 8 read-only RPC query tests in
test/e2e/daemon/ready/smoke_test.gointo one shared-daemon parentTestRPCQuerieswitht.Runsubtests. Was 8 full in-process daemons + 8 Aerospike TestContainers; now 1 of each for the group.GetRawTransactionVerbose— broadcasts a tx spending the fixture coinbase) runs last, so it can't affect the reads.smoke_test.go.smoke_test.go.Scope / correction
This is the smoke-query-group slice of #999, not the whole issue.
Worth flagging: #999 (and #997) attribute the per-start cost to
StartBlockchainServiceintest/nodeHelpers/blockchainDaemon.go. The gatedreadye2e tests don't use that helper — they usedaemon.NewTestDaemon. PR #1000 fixednodeHelpers/blockchainDaemon.go(used by the blockassembly system tests) and is orthogonal; it does not speed up these e2e tests. The real cost here isNewTestDaemon+ per-test Aerospike container churn, which this PR cuts.The other #999 files (
legacy_sync,reorg,banlist) are multi-node or state-mutating with no state-safe shared subset, so they're left as-is.Test Plan
go build ./... && go vet ./test/e2e/daemon/ready/...— cleango test -count=1 -race -run TestRPCQueries -v .— all 8 subtests PASS; exactly 1 Aerospike container init (was 8)TestSendTxAndCheckState+TestGenerateToAddress— PASS