Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor channel test helpers #1682

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Refactor channel test helpers #1682

merged 2 commits into from
Feb 4, 2021

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Feb 3, 2021

It's useful to separate these test methods in a dedicated trait instead of always bundling it with FixtureTestSuite.

In particular, it was previously impossible to use both BitcoindService and StateTestsHelperMethods because BitcoindService doesn't work with fixtures (it leverages beforeAll and afterAll instead because launching one bitcoind instance per-test would be too expensive and useless).

My goal is to then use this new StateTestsHelperMethods in the ZmqWatcherSpec (and other related actors) to test the CPFP and RBF logic against real commitments.

It's useful to separate these test methods in a dedicated trait instead of
always bundling it with `FixtureTestSuite`.

In particular, it was previously impossible to use both `BitcoindService`
and `StateTestsHelperMethods` because `BitcoindService` doesn't work with
fixtures (it leverages `beforeAll` and `afterAll` instead because launching
one bitcoind instance per-test would be too expensive and useless).
@t-bast t-bast requested a review from pm47 February 3, 2021 14:35
@codecov-io
Copy link

Codecov Report

Merging #1682 (9fa6fa5) into master (0127ace) will increase coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1682      +/-   ##
==========================================
+ Coverage   85.87%   85.98%   +0.11%     
==========================================
  Files         151      151              
  Lines       11439    11439              
  Branches      505      505              
==========================================
+ Hits         9823     9836      +13     
+ Misses       1616     1603      -13     
Impacted Files Coverage Δ
...main/scala/fr/acinq/eclair/io/PeerConnection.scala 82.35% <0.00%> (+0.42%) ⬆️
...main/scala/fr/acinq/eclair/router/Validation.scala 92.66% <0.00%> (+1.54%) ⬆️
...cala/fr/acinq/eclair/payment/relay/NodeRelay.scala 95.27% <0.00%> (+1.57%) ⬆️
...q/eclair/blockchain/electrum/ElectrumWatcher.scala 77.77% <0.00%> (+2.38%) ⬆️
...clair/blockchain/bitcoind/rpc/BatchingClient.scala 100.00% <0.00%> (+13.63%) ⬆️

@t-bast t-bast merged commit 4902362 into master Feb 4, 2021
@t-bast t-bast deleted the refactor-channel-test-helpers branch February 4, 2021 15:52
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.

3 participants