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

accounts db/refactor accounts db test - add macro for accounts-db panic test #786

Merged

Conversation

HaoranYi
Copy link

Problem

add macro for accounts-db panic test

Continued on #784

Summary of Changes

  1. add macro for accounts-db panic test
  2. convert double remove test for both account file provider

Fixes #

@HaoranYi HaoranYi changed the title accounts db/refactor accounts db test3 add macro for accounts-db panic test Apr 12, 2024
@HaoranYi
Copy link
Author

The actual change is in the last commit.
Please only review the last change if you have already reviewed #784

@HaoranYi HaoranYi self-assigned this Apr 12, 2024
Copy link

@brooksprumo brooksprumo 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. Please re-request a review once the previous PR has merged and this PR has been rebased.

accounts-db/src/accounts_db.rs Outdated Show resolved Hide resolved
#[test_case(AccountsFileProvider::AppendVec; "append_vec")]
#[test_case(AccountsFileProvider::HotStorage; "hot_storage")]
fn $name(accounts_file_provider: AccountsFileProvider) {
(@testfn $name:ident, $accounts_file_provider: ident, |$accounts_db:ident| $inner: tt) => {

Choose a reason for hiding this comment

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

Nice 👍

@HaoranYi HaoranYi changed the title add macro for accounts-db panic test accounts db/refactor accounts db test - add macro for accounts-db panic test Apr 15, 2024
HaoranYi added 2 commits April 17, 2024 14:26
@HaoranYi HaoranYi force-pushed the accounts-db/refactor_accounts_db_test3 branch from 97c1b2e to 4b17876 Compare April 17, 2024 14:26
@HaoranYi
Copy link
Author

No code change. Rebase to master to pick up #784.

@brooksprumo brooksprumo self-requested a review April 17, 2024 14:30
Copy link

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

:shipit:

@HaoranYi
Copy link
Author

@jeffwashington Can you help to review this PR? Thanks!

Copy link

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

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

lgtm
How many tests panic?

@HaoranYi HaoranYi merged commit 283f433 into anza-xyz:master Apr 17, 2024
38 checks passed
@HaoranYi
Copy link
Author

HaoranYi commented Apr 17, 2024

lgtm How many tests panic?

There are 9 more tests that expect panics.

@HaoranYi HaoranYi deleted the accounts-db/refactor_accounts_db_test3 branch April 17, 2024 17:52
michaelschem pushed a commit to michaelschem/agave that referenced this pull request Apr 20, 2024
…ic test (anza-xyz#786)

* add macro for accounts-db panic test
convert double remove test for both account file provider

* refactor to share accounts_db_test and accounts_db_panic_test macro

* rebase

---------

Co-authored-by: HaoranYi <[email protected]>
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