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

Adding can request tests #1528

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

BradleyOlson64
Copy link
Contributor

@BradleyOlson64 BradleyOlson64 commented Sep 13, 2023

Closes #1478

For this issue we wanted to add tests to cover three cases:

  1. A cluster member seeing a Seconded message should request the candidate from the sender
  2. A cluster member receiving a request should respond if the requester has not sent them any statements about the candidate
  3. A cluster member should reject requests if the requester appears to know the candidate (has sent them a Seconded statement)

Case 1 is already covered by the test seconded_statement_leads_to_request in polkadot/node/network/statement-distribution/src/vstaging/tests/cluster.rs

Cases 2 and 3 are covered by the new test local_node_checks_that_peer_can_request_before_responding added in this PR

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 2/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3665534

Copy link
Contributor

@mrcnski mrcnski left a comment

Choose a reason for hiding this comment

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

Looks good, but should cases 2 and 3 perhaps be separate tests? Can testing for one in the same test, affect the outcome of the other one later on?

@BradleyOlson64
Copy link
Contributor Author

@mrcnski I think we're all fine on that front. I'm testing the two request-response behaviors on different peers, peer_a vs peer_b, so I don't think one case should effect the other.

@BradleyOlson64
Copy link
Contributor Author

bot merge

@command-bot
Copy link

command-bot bot commented Sep 13, 2023

@BradleyOlson64 bot merge and bot rebase are not supported anymore. Please use native Github "Auto-Merge" and "Update Branch" buttons instead.
image

@BradleyOlson64 BradleyOlson64 merged commit aba1699 into rh-debug-statement-dist Sep 13, 2023
99 of 112 checks passed
@BradleyOlson64 BradleyOlson64 deleted the brad-add-request-tests branch September 13, 2023 18:34
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
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.

5 participants