Add simple integration test between Channel and Router#2270
Merged
Conversation
565291d to
90b55bf
Compare
This was referenced May 13, 2022
600c12f to
d48f9fd
Compare
pm47
added a commit
that referenced
this pull request
May 17, 2022
From scalatest's `ParallelTestExecution` doc: > ScalaTest's normal approach for running suites of tests in parallel is to run different suites in parallel, but the tests of any one suite sequentially. > [...] > To make it easier for users to write tests that run in parallel, this trait runs each test in its own instance of the class. Running each test in its own instance enables tests to use the same instance vars and mutable objects referenced from instance variables without needing to synchronize. Although ScalaTest provides functional approaches to factoring out common test code that can help avoid such issues, running each test in its own instance is an insurance policy that makes running tests in parallel easier and less error prone. This means that for each single test of the `channel.states` package, we instantiate one actor system, which contains two thread pools. With default settings, that's a minimum of 2*8 threads per individual test. That's already pretty bad, and with 65cf238 (#2270) we add a factor of 3 on top of that, which makes us go past the OS limits on github CI. setup | peak thread count | run time -------|---------------------|---- baseline | 5447 | 5m 44s sequential | 1927 | 5m 9s (*) (*) It's actually so bad, that tests run actually faster without parallelization!
The test currently fails, which looks like a bug to me. When a local channel graduates from private to public, we do not copy existing known `channel_update`s. Current implementation guarantees that we will process our local `channel_update` immediately, but what about our peer?
We fix a second bug where gossip origin wasn't properly set for local announcements
d48f9fd to
3041276
Compare
t-bast
reviewed
May 18, 2022
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/ChannelStateTestsHelperMethods.scala
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/h/ClosingStateSpec.scala
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/router/ChannelRouterIntegrationSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/router/ChannelRouterIntegrationSpec.scala
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/router/ChannelRouterIntegrationSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/router/ChannelRouterIntegrationSpec.scala
Outdated
Show resolved
Hide resolved
pm47
added a commit
that referenced
this pull request
Jun 3, 2022
pm47
added a commit
that referenced
this pull request
Jun 3, 2022
Don't take the `buried` property into account. See #2270 (comment)
pm47
added a commit
that referenced
this pull request
Jun 6, 2022
pm47
added a commit
that referenced
this pull request
Jun 6, 2022
Don't take the `buried` property into account. See #2270 (comment)
pm47
added a commit
that referenced
this pull request
Jun 8, 2022
pm47
added a commit
that referenced
this pull request
Jun 8, 2022
Don't take the `buried` property into account. See #2270 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a simpler alternative to #2268.
In this PR we add a basic integration test between
ChannelandRouterthat checks the proper handling of local announcements.This test found two bugs, fixed in two separate commits.