Skip to content

Add MockDownstream#1671

Merged
GitGab19 merged 1 commit into
stratum-mining:mainfrom
jbesraa:2025-05-12/downstream-mock
May 15, 2025
Merged

Add MockDownstream#1671
GitGab19 merged 1 commit into
stratum-mining:mainfrom
jbesraa:2025-05-12/downstream-mock

Conversation

@jbesraa

@jbesraa jbesraa commented May 12, 2025

Copy link
Copy Markdown
Contributor

Blocked by #1662
Partially resolves #1670

@jbesraa jbesraa marked this pull request as draft May 12, 2025 13:55
@codecov

codecov Bot commented May 12, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.20%. Comparing base (09a0b3d) to head (6deae6d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1671   +/-   ##
=======================================
  Coverage   21.20%   21.20%           
=======================================
  Files         134      134           
  Lines       10000    10000           
=======================================
  Hits         2120     2120           
  Misses       7880     7880           
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_sv2-coverage 10.26% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 37.68% <ø> (ø)
codec_sv2-coverage 0.03% <ø> (ø)
common_messages_sv2-coverage 0.25% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.54% <ø> (ø)
jd_client-coverage 0.39% <ø> (ø)
jd_server-coverage 12.67% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 3.61% <ø> (ø)
mining-coverage 5.09% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 1.18% <ø> (ø)
noise_sv2-coverage 8.74% <ø> (ø)
pool_sv2-coverage 5.84% <ø> (ø)
protocols 30.46% <ø> (ø)
roles 11.50% <ø> (ø)
roles_logic_sv2-coverage 15.33% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.08% <ø> (ø)
utils 36.39% <ø> (ø)
v1-coverage 4.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jbesraa jbesraa marked this pull request as ready for review May 15, 2025 08:39
@jbesraa

jbesraa commented May 15, 2025

Copy link
Copy Markdown
Contributor Author

This is ready for review

@GitGab19

Copy link
Copy Markdown
Member

An integration test is failing: https://github.com/stratum-mining/stratum/actions/runs/15040627485/job/42271266170?pr=1671

It's the "usual" success_pool_template_provider_connection test, with the error Failed to start bitcoind: it appears that bitcoind is not reachable.

It would be good to fix it since I noticed it's randomly failing on many PRs.

@GitGab19 GitGab19 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Shourya742 Shourya742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks cleans to me. Surprisingly I am facing this issue running the test locally.

Failed to start bitcoind due to Error while executing "/home/stratum/test/integration-tests/template-provider/bitcoin-sv2-tp-0.1.15/bin/bitcoind"
Failed to start bitcoind due to Error while executing "/home/stratum/test/integration-tests/template-provider/bitcoin-sv2-tp-0.1.15/bin/bitcoind"
Failed to start bitcoind due to Error while executing "/home/stratum/test/integration-tests/template-provider/bitcoin-sv2-tp-0.1.15/bin/bitcoind"
Failed to start bitcoind due to Error while executing "/home/stratum/test/integration-tests/template-provider/bitcoin-sv2-tp-0.1.15/bin/bitcoind"
Failed to start bitcoind due to Error while executing "/home/stratum/test/integration-tests/template-provider/bitcoin-sv2-tp-0.1.15/bin/bitcoind"

Comment thread test/integration-tests/lib/mock_downstream.rs Outdated
.. to `integration-tests`

This module can act as a downstream role. It can send and receive
messages from an upstream role.
@GitGab19 GitGab19 merged commit ac25a53 into stratum-mining:main May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add MockDownstream and MockUpstream test module

3 participants