Uh oh!
There was an error while loading. Please reload this page.
Genericize Test Functions - #2177
Conversation
In the coming commits we'll add some additional complexity to the event handling flows, so best to DRY them up before we get there.
TheBlueMatt
commented
Apr 12, 2023
Assigning val and wilmer cause y'all are already on 2111. |
Uh oh!
There was an error while loading. Please reload this page.
| &'a test_utils::TestFeeEstimator, &'a test_utils::TestRouter<'a>, | ||
| &'a test_utils::TestLogger>; | ||
| struct ANodeHolder<'a, P: Persist<InMemorySigner>> { |
There was a problem hiding this comment.
Can we migrate the BackgroundProcessor utils as well so they can use functional_test_utils?
There was a problem hiding this comment.
I think so, but its a bit big, would have to add a bunch of new accessors and maybe do the chain tracking via the trait too.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1be3caf to
db9cd01CompareCodecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #2177 +/- ##
==========================================
- Coverage 91.36% 91.34% -0.02%
==========================================
Files 102 102 Lines 50369 50401 +32 Branches 50369 50401 +32 ==========================================
+ Hits 46018 46040 +22 - Misses 4351 4361 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
valentinewallace
left a comment
There was a problem hiding this comment.
LGTM after @wpaulino takes a look
Uh oh!
There was an error while loading. Please reload this page.
In our test utilities, we generally refer to a `Node` struct which holds a `ChannelManager` and a number of other structs. However, we use the same utilities in benchmarking, where we have a different `Node`-like struct. This made moving from macros to functions entirely impossible, as we end up needing multiple types in a given context. Thus, here, we take the pain and introduce some wrapper traits which encapsulte what we need from `Node`, swapping some of our macros to functions.
This marginally reduces the quantity of code compiled in tests further.
db9cd01 to
cfb9eb9CompareTheBlueMatt
commented
Apr 13, 2023
Squashed with typo fixes: |
This is the prefactors from #2111 which just set us up to have more functions in testing, avoiding more macros in tests.