scripts: Assert what the client reports when a push is missing a fragment - #195
Open
bclarke123 wants to merge 1 commit into
Open
scripts: Assert what the client reports when a push is missing a fragment#195bclarke123 wants to merge 1 commit into
bclarke123 wants to merge 1 commit into
Conversation
…ment The client reconstructs the server's AddressNotFound and reports it in its own words with the missing address; the server's status text is never echoed, so the assertion on "Missing fragment" fails on main. Assert the client wording and that a dropped hash is named instead. Signed-off-by: Ben Clarke <ben@arrayofstars.com>
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.
Problem
test_push_missing_fragments(added in 7c3dddc) fails deterministically onmain, not just on PR branches: the smoke job fails on the dependabot run 34148922667 and on 34085660968, and it fails 3/3 locally on9a9c24bwith afailure_generatorbuild.The test asserts that the push output contains the server's status text,
"Missing fragment". The client never echoes that text: it decodes theFAILED_PRECONDITIONdetails intoProtocolError::AddressNotFoundand reports it in its own words. The actual output is— which is the behavior 7c3dddc set out to produce (the address is the first entry of
DROPPED_FRAGMENT_HASHES), so the server and client are right and the assertion is wrong.Change
Assert on what the client actually reports: the
peer is missing a fragmentwording (pins the error class the client reconstructed) and that the output names one of the dropped fragment hashes (pins that the right fragment was reported). Both are stronger than the prose match they replace.Checks
The test passes 3/3 locally against a
failure_generatorbuild ofmain, including the follow-on push/clone/delete steps in the same test.