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

Write range sync tests in external event-driven form #6618

Merged
merged 7 commits into from
Dec 16, 2024

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Nov 27, 2024

Issue Addressed

Re-write existing range sync tests into an event-driven format to accommodate the refactor introduced in

This format was introduced in

and does not make assumptions about internal functions, it treats sync as a black box inputting actual events used in production.

Note: I've removed the generics used in range sync since now we don't unit test directly

@dapplion dapplion added work-in-progress PR is a work-in-progress syncing labels Nov 27, 2024
@dapplion dapplion marked this pull request as ready for review November 27, 2024 13:53
@dapplion dapplion added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Nov 27, 2024
@jimmygchen jimmygchen self-assigned this Dec 10, 2024
@jimmygchen
Copy link
Member

Nice! Looks clean and easy to read 👍

@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Dec 12, 2024
@dapplion dapplion requested a review from jimmygchen December 14, 2024 13:53
@dapplion
Copy link
Collaborator Author

    sync::tests::range::state_update_while_purging
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 86 filtered out; finished in 7.58s

──── STDERR:             network sync::tests::range::state_update_while_purging
thread 'sync::tests::range::state_update_while_purging' panicked at /home/runner/work/lighthouse/lighthouse/beacon_node/beacon_chain/src/test_utils.rs:904:14:
called `Result::unwrap()` on an `Err` value: ExecutionLayerMissing

This test is failing in CI after switching to async, but can't reproduce locally

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

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

I managed to reproduce the failing test locally, not sure why it was passing before 🤔 We do need it in this case I think, so we might have uncovered a lurking issue - adding a mock execution layer fixed it.

The other changes look good, thanks!

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Dec 16, 2024
@jimmygchen
Copy link
Member

@mergify queue

Copy link

mergify bot commented Dec 16, 2024

queue

🛑 The pull request has been removed from the queue default

Pull request #6618 has been dequeued by a dequeue command.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@jimmygchen
Copy link
Member

@mergify dequeue

Copy link

mergify bot commented Dec 16, 2024

This pull request has been removed from the queue for the following reason: pull request dequeued.

Pull request #6618 has been dequeued by a dequeue command.

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

Copy link

mergify bot commented Dec 16, 2024

dequeue

✅ The pull request has been removed from the queue default

@jimmygchen
Copy link
Member

@mergify requeue

Copy link

mergify bot commented Dec 16, 2024

requeue

✅ This pull request will be re-embarked automatically

The followup queue command will be automatically executed to re-embark the pull request

Copy link

mergify bot commented Dec 16, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 1c5be34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge. syncing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants