-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add diffusion tests #4086
Merged
Merged
Add diffusion tests #4086
Conversation
This file contains 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
5 tasks
bolt12
approved these changes
Oct 19, 2022
Comment on lines
+748
to
+752
Just Connection { connState = SYN_SENT, connProvider } | ||
| connProvider == localAddress -> | ||
throwSTM (connectedIOError fd_) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if the error is the right one, I need to check what error real sockets would throw.
ae73cce
to
91179f7
Compare
When we create a connection we set it's state to `SYN_SENT`, before it is accepted by the other side, we could try to connect again. In such case we ought to error.
Reproduce #4064 in simulation.
PingPong is used as a warm mini-protocol, and thus it's suspended in the `StIdle` state. For this reason it cannot have a timeout for this state.
When `keyedTimeout` encounters the last event, let it include things that haven't fired.
aafaba9
to
954e16b
Compare
954e16b
to
005a6c5
Compare
Drop `diffusion` from test names. Drop `multinodeSim` name space, but instead use `generators` name space.
This is especially useful when debugging a test counterexamples, when additional constructors usually comes handy.
005a6c5
to
72caf70
Compare
bors merge |
This was referenced Oct 28, 2022
iohk-bors bot
added a commit
that referenced
this pull request
Nov 9, 2022
4120: Cherry picked network changes for cardano-node-1.35.5 release r=coot a=coot This cherry-picked patches from the following PRs: * #3794 * #3844 * #3785 * #3904 * #3915 * #3852 * #3970 * #3979 * #4015 * #4067 * #4004 * #4086 * #4113 * #4106 * #4127 * #4103 Also cherry-picked almost all the commits which modify GitHub actions: * 18c5244 Run GitHub Actions on pull requests * 3adf5a9 Use newer version of io-sim * ee9b7a6 Fix GH Actions Windows CI: switch from pkgconf to pkg-config * e6cf074 github-actions: use `ubuntu-latest` * 9a8b959 Updated versions of github actions * fc8f8f0 Fix GH Actions Windows CI caching * 7f07c40 Windows Github Actions now use MSYS2 * b21a7ce Fix chocolatey CI error * #4134 TODO: * [x] bump versions of packages * [x] input-output-hk/cardano-haskell-packages#84 Co-authored-by: Mark Tullsen <tullsen@galois.com> Co-authored-by: Marcin Szamotulski <coot@coot.me>
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.
Description
Added new tests:
prop_diffusion_target_active_local_below
- a copy of a similar test of theoutbound governor
prop_diffusion_async_demotions
- a test which makes sure that ifPeerStateActions
reportHotToCold
demotion, the outbound governor willremove the peer from the active set.
unit_diffusion_async_demotions
- a special case of the previous test, whichreproduces the bug reported in Outbound governor does not remove a hot peer when mux errors #4064
The pull request refactors usage of traces by the diffusion tests, which
make it easier to get debugging output.
The pull request modifies
keyedTimeout
so that it does not ignores eventswhich did not timeout till the end of the simulation.
Requires #4004 to be merged first.
Checklist
interface-CHANGELOG.md
interface-CHANGELOG.md