Skip to content

scripts: Assert what the client reports when a push is missing a fragment - #195

Open
bclarke123 wants to merge 1 commit into
EpicGames:mainfrom
bclarke123:fix-push-missing-fragments-test
Open

scripts: Assert what the client reports when a push is missing a fragment#195
bclarke123 wants to merge 1 commit into
EpicGames:mainfrom
bclarke123:fix-push-missing-fragments-test

Conversation

@bclarke123

Copy link
Copy Markdown
Contributor

Problem

test_push_missing_fragments (added in 7c3dddc) fails deterministically on main, not just on PR branches: the smoke job fails on the dependabot run 34148922667 and on 34085660968, and it fails 3/3 locally on 9a9c24b with a failure_generator build.

The test asserts that the push output contains the server's status text, "Missing fragment". The client never echoes that text: it decodes the FAILED_PRECONDITION details into ProtocolError::AddressNotFound and reports it in its own words. The actual output is

[Error] Address not found: 9d3f226e7cb165563394906ba32e9fc3a6d0f9721287a9485d1e0533112bdd01-…
  at lore-revision/src/branch/push.rs:1078 - pushing branch to remote, peer is missing a fragment

— 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 fragment wording (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_generator build of main, including the follow-on push/clone/delete steps in the same test.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant