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

algod importer: Fix archival mode and update tests. #57

Merged
merged 5 commits into from
Apr 18, 2023

Conversation

winder
Copy link
Contributor

@winder winder commented Apr 14, 2023

Summary

When adding in the recent follow mode automation the algod import mode the archival configuration was not accounted for. A bug in the unit test which treated sync calls to be treated as no-ops instead of not found errors allowed the regression to be missed.

Test Plan

Update archival mode unit tests to return a 404 when sync endpoints are called to properly reflect the behavior of an archival node.

@winder winder requested review from Eric-Warehime, shiqizng and a team April 14, 2023 17:03
algodServer: NewAlgodServer(GenesisResponder,
BlockResponder,
BlockAfterResponder,
MakeSyncRoundResponder(http.StatusNotFound))},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of these http.StatusOK to http.StatusNotFound changes led to tests that fail without the bugfix.

Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Verified the new tests fail on old and pass with new. Left a minor question.

Copy link
Contributor

@algochoi algochoi 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, one question about parallel tests

Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

LGTM

@winder winder merged commit 4228b20 into algorand:master Apr 18, 2023
@winder winder deleted the will/fix-archival-importer branch April 18, 2023 16:03
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.

3 participants