Skip to content

refactor: improve tests reliability#1458

Merged
jansegre merged 1 commit intomasterfrom
refactor/tests-reliability
Oct 21, 2025
Merged

refactor: improve tests reliability#1458
jansegre merged 1 commit intomasterfrom
refactor/tests-reliability

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Oct 10, 2025

Motivation

We had some tests running code that differs from what runs in production, so this PR addresses this by removing said code to make sure tests and production run equally.

Notably all BlueprintTestCase tests, which are a great deal of nano-related tests, were using the memory trie instead of the RocksDB trie.

Acceptance Criteria

  • Change way vertices are propagated with the DAGBuilder to use always use the vertex_handler.on_new_relayed_vertex, instead of a manual call to an internal method, which differed from what is called in production. The new_relayed_vertex arg, which was unused, is removed.
  • Remove MemoryNodeTrieStore and NCMemoryStorageFactory which are not used in production, and update tests accordingly.
  • Refactor the TestRunner so it's responsible for building its own dependencies.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Oct 10, 2025
@glevco glevco moved this from Todo to In Progress (Done) in Hathor Network Oct 10, 2025
@github-actions
Copy link

🐰 Bencher Report

Branchrefactor/tests-reliability
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
2.01 m
(+15.75%)Baseline: 1.73 m
1.56 m
(77.75%)
2.08 m
(96.46%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.06%. Comparing base (23df2df) to head (a899921).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1458      +/-   ##
==========================================
- Coverage   86.10%   86.06%   -0.04%     
==========================================
  Files         437      437              
  Lines       33987    33967      -20     
  Branches     5316     5315       -1     
==========================================
- Hits        29264    29235      -29     
- Misses       3678     3684       +6     
- Partials     1045     1048       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glevco glevco force-pushed the refactor/tests-reliability branch 2 times, most recently from 6f3b9d3 to e40abc7 Compare October 15, 2025 13:37
msbrogli
msbrogli previously approved these changes Oct 15, 2025
@glevco glevco force-pushed the refactor/tests-reliability branch from e40abc7 to 55d6ae5 Compare October 15, 2025 19:48
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Oct 15, 2025
@jansegre jansegre mentioned this pull request Oct 20, 2025
2 tasks
@glevco glevco force-pushed the refactor/tests-reliability branch from 211d85f to 8a74dc2 Compare October 21, 2025 14:08
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Oct 21, 2025
@glevco glevco force-pushed the refactor/tests-reliability branch from 8a74dc2 to e6a4a6d Compare October 21, 2025 14:11
@glevco glevco force-pushed the refactor/tests-reliability branch from e6a4a6d to a899921 Compare October 21, 2025 14:11
@jansegre jansegre merged commit cc6bc92 into master Oct 21, 2025
1 of 2 checks passed
@jansegre jansegre deleted the refactor/tests-reliability branch October 21, 2025 14:12
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Oct 21, 2025
@jansegre jansegre mentioned this pull request Oct 21, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants