Closed mmsqe closed 1 month ago
The pull request introduces modifications to the integration_tests/test_basic.py
and integration_tests/utils.py
files. It adds new test cases for transaction inclusion and enhances existing tests to improve error handling and synchronization. Additionally, the utility functions are updated to include a timeout parameter for better control during block waiting operations. These changes aim to enhance the robustness and reliability of transaction testing, particularly in scenarios involving gas management and batch transactions.
File | Change Summary |
---|---|
integration_tests/test_basic.py | - Added test_tx_inclusion to evaluate heavy transaction inclusion under varying max_gas_wanted configurations. |
- Enhanced test_failed_transfer_tx to verify inclusion of failed transfer transactions in batch transactions. |
|
- Minor synchronization improvements with added sleep statements. | |
- Refined error handling in test_exception and test_refund_unused_gas_when_contract_tx_reverted . |
|
integration_tests/utils.py | - Updated wait_for_new_blocks to include a timeout parameter for maximum wait time. |
- Improved error handling in wait_for_block to capture and print AssertionError exceptions. |
|
- Minor formatting changes for improved readability. |
Objective | Addressed | Explanation |
---|---|---|
Test test_tx_inclusion for flakiness related to transaction inclusion (#1656) |
โ | |
Enhance error handling in transaction tests (#1656) | โ |
max_gas_wanted
parameter, relevant to new test cases in this PR.integration_tests/test_basic.py
, including modifications to test_tx_inclusion
.integration_tests/test_basic.py
, related to main PR changes.๐ In the meadow, where bunnies play,
New tests hop in, brightening the day.
With gas limits set, and errors caught,
Our code is stronger, as weโve sought!
So letโs celebrate, with a joyful cheer,
For robust testing is finally here! ๐ฅณ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 16.64%. Comparing base (
8a50b30
) to head (cc5f7d9
). Report is 1 commits behind head on main.:exclamation: There is a different number of reports uploaded between BASE (8a50b30) and HEAD (cc5f7d9). Click for more details.
HEAD has 12 uploads less than BASE
| Flag | BASE (8a50b30) | HEAD (cc5f7d9) | |------|------|------| |integration_tests|20|10| ||2|0|
๐ฎ๐ป๐ฎ๐ป๐ฎ๐ป !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! ๐ฎ๐ป๐ฎ๐ป๐ฎ๐ป
Closes: https://github.com/crypto-org-chain/cronos/issues/1656
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit