Repository navigation
test: Check a new VM in no_tracer and drop run_t8n_env() - #1872
Conversation
The no_tracer test now creates its own VM. Previously, it checked the VM shared by the tracing tests, which is new only when the test runs first; otherwise, the previous test has just removed its tracers.
The base fee tests call run_t8n() with an empty state and no transactions. Previously, run_t8n_env() repeated run_t8n()'s body for that.
There was a problem hiding this comment.
🟢 Approved
No active review issues block the test-isolation and setup-deduplication changes.
No open issues 🎉
What changed in this PR
This PR improves test isolation and removes duplicate setup code in the tracing and state-transition unit tests.
Changes:
- Make
no_tracercheck a newly created VM, independent of tracing test execution order. - Replace
run_t8n_env()with existingrun_t8n()calls using an empty state and no transactions.
| File | Description |
|---|---|
test/unittests/tracing_test.cpp |
Create a fresh VM to verify that it starts without a tracer. |
test/unittests/tooling_t8n_test.cpp |
Remove the duplicate helper and reuse run_t8n() in base fee tests. |
Review effort: Balanced
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1872 +/- ##
==========================================
- Coverage 98.21% 98.21% -0.01%
==========================================
Files 187 187
Lines 17388 17377 -11
Branches 3990 3990
==========================================
- Hits 17077 17066 -11
Misses 239 239
Partials 72 72
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The no_tracer test now creates its own VM. Previously, it checked the VM shared by the tracing tests, which is new only when the test runs first; otherwise, the previous test has just removed its tracers.
The base fee tests call run_t8n() with an empty state and no transactions instead of run_t8n_env(), which repeated run_t8n()'s body.