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

Refactor web3 tests code #10293

Merged

Conversation

filev94
Copy link
Contributor

@filev94 filev94 commented Feb 4, 2025

Description:

Removed similar code from several tests and put it in parent class so that if a change is needed it should be done in one place only. This is the first PR, more might be needed if i find more code that needs to be extracted in a similar way.

Related issue(s):

Fixes #10255

Notes for reviewer:

This pr fixes setup of ContractCallDynamicCallsTest - as a result there are 20+ test fixes in this class

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

# Conflicts:
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallDynamicCallsTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/OpcodeServiceTest.java
Signed-off-by: filev94 <[email protected]>
Signed-off-by: filev94 <[email protected]>
@filev94 filev94 requested a review from a team as a code owner February 4, 2025 14:20
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.19%. Comparing base (b94461e) to head (ca3de16).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #10293   +/-   ##
=========================================
  Coverage     92.19%   92.19%           
  Complexity     8006     8006           
=========================================
  Files           980      980           
  Lines         33444    33444           
  Branches       4218     4218           
=========================================
+ Hits          30833    30834    +1     
  Misses         1610     1610           
+ Partials       1001     1000    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@steven-sheehy steven-sheehy added enhancement Type: New feature test Test infrastructure, automated tests required, etc web3 Area: Web3 API labels Feb 4, 2025
@steven-sheehy steven-sheehy added this to the 0.124.0 milestone Feb 4, 2025
Signed-off-by: filev94 <[email protected]>
Signed-off-by: filev94 <[email protected]>
# Conflicts:
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/AbstractContractCallServiceTest.java
Signed-off-by: filev94 <[email protected]>
Signed-off-by: filev94 <[email protected]>
@kselveliev kselveliev self-requested a review February 6, 2025 12:30
@bilyana-gospodinova
Copy link
Contributor

There is a persistFungibleToken() method in the ContractCallServicePrecompileModificationTest as well. Please address this an another PR, as well as the rest of the methods that need refactoring, such as: tokenAccountPersist(), persistTokenBalance(), etc.

@filev94
Copy link
Contributor Author

filev94 commented Feb 6, 2025

persistFungibleToken() refactoring along with the methods used by the return object will be addressed in a future PR. I've mentioned it in the issue

@steven-sheehy steven-sheehy merged commit 51aaec4 into hashgraph:main Feb 6, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature test Test infrastructure, automated tests required, etc web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor code in web3 tests
4 participants