8000 fix(integration-tests): fix tests after tx status RPC changes by marcelo-gonzalez · Pull Request #8289 · near/nearcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(integration-tests): fix tests after tx status RPC changes #8289

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

Merged
merged 7 commits into from
Jan 5, 2023

Conversation

marcelo-gonzalez
Copy link
Contributor
@marcelo-gonzalez marcelo-gonzalez commented Jan 4, 2023

#7928 changed Chain::get_recursive_transaction_results() to skip refund receipts, so the several checks for receipts outcome length in standard_cases::rpc are now wrong, because they expect to find the refunds. Fix it by changing all these asserts, and by changing
RuntimeUser::get_recursive_transaction_results to match Chain::get_recursive_transaction_results

failed tests (the ones that start with standard_cases::rpc::): https://nayduck.near.org/#/run/2802

to be safe, can check that these are indeed refunds by printing rceipts out like:

for r in transaction_result.receipts_outcome.iter() {
    let b = node_user.get_block(r.block_hash).unwrap();
    let mut found = false;
    'outer: for c in b.chunks {
        let ch = node_user.get_chunk_by_height(b.header.height, c.shard_id).unwrap();
        for receipt in ch.receipts {
            if receipt.receipt_id == r.id {
                dbg!(receipt);
                found = true;
                break 'outer;
            }
        }
    }
    if !found {
        eprintln!("cant find {}", r.id);
    }
}

near#7928 changed
`Chain::get_recursive_transaction_results()` to skip refund receipts,
so the several checks for receipts outcome length in
`standard_cases::rpc` are now wrong, because they expect to find the
refunds. Fix it by changing all these asserts

failed tests (the ones that start with `standard_cases::rpc::`):
https://nayduck.near.org/#/run/2802

to be safe, can check that these are indeed refunds by printing
rceipts out like:

```
for r in transaction_result.receipts_outcome.iter() {
    let b = node_user.get_block(r.block_hash).unwrap();
    let mut found = false;
    'outer: for c in b.chunks {
        let ch = node_user.get_chunk_by_height(b.header.height, c.shard_id).unwrap();
        for receipt in ch.receipts {
            if receipt.receipt_id == r.id {
                dbg!(receipt);
                found = true;
                break 'outer;
            }
        }
    }
    if !found {
        eprintln!("wtf cant find {}", r.id);
    }
}

```
@marcelo-gonzalez marcelo-gonzalez requested a review from a team as a code owner January 4, 2023 19:29
@near-bulldozer near-bulldozer bot merged commit abe7c13 into near:master Jan 5, 2023
anthony-near added a commit that referenced this pull request Jan 18, 2023
* resolved merge conflicts in rpc_transactions.rs tests from rev
9B10
ert

* Revert "fix(integration-tests): fix tests after tx status RPC changes (#8289)"

This reverts commit abe7c13.
marcelo-gonzalez pushed a commit to marcelo-gonzalez/nearcore that referenced this pull request Jan 26, 2023
* resolved merge conflicts in rpc_transactions.rs tests from revert

* Revert "fix(integration-tests): fix tests after tx status RPC changes (near#8289)"

This reverts commit abe7c13.
marcelo-gonzalez pushed a commit to marcelo-gonzalez/nearcore that referenced this pull request Jan 26, 2023
* resolved merge conflicts in rpc_transactions.rs tests from revert

* Revert "fix(integration-tests): fix tests after tx status RPC changes (near#8289)"

This reverts commit abe7c13.
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
0