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

test: Cancel block_stream task to workaround infinite lake loop #856

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

morgsmccauley
Copy link
Collaborator

near-lake-framework will infinitely retry, making our tests infinitely hang. This PR monitors the last_processed_ block, and cancels the task from the outside when the last desired block is reached.

@morgsmccauley morgsmccauley requested a review from a team as a code owner July 9, 2024 02:03
@morgsmccauley morgsmccauley self-assigned this Jul 9, 2024
Copy link
Collaborator

@darunrs darunrs left a comment

Choose a reason for hiding this comment

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

Smart way of solving this issue!

@@ -479,7 +493,7 @@ mod tests {

mock_lake_s3_client
.expect_list_common_prefixes()
.returning(|_, _| Ok(vec![]));
.returning(|_, _| Ok(vec![107503704.to_string(), 107503705.to_string()]));
Copy link
Collaborator

Choose a reason for hiding this comment

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

What caused this to change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The test setup wasn't correct, I think they probably got edited while they were ignored

block-streamer/src/block_stream.rs Outdated Show resolved Hide resolved
@morgsmccauley morgsmccauley merged commit 8c40b2e into main Jul 9, 2024
4 checks passed
@morgsmccauley morgsmccauley deleted the test/block-stream-fix branch July 9, 2024 04:29
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.

2 participants