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 code in web3 tests #10255

Open
filev94 opened this issue Jan 30, 2025 · 2 comments · Fixed by #10293
Open

Refactor code in web3 tests #10255

filev94 opened this issue Jan 30, 2025 · 2 comments · Fixed by #10293
Assignees
Labels
enhancement Type: New feature web3 Area: Web3 API
Milestone

Comments

@filev94
Copy link
Contributor

filev94 commented Jan 30, 2025

Problem

A lot of tests have similar individual setup that can be extracted in a parent class and thus making the code easier to read and maintain. Methods like persistFungibleToken and fungibleTokenPersist exist in child and parent classes that are duplicated in different suits and mistake in one needs to be corrected in all. This will remove the need to fix broken tests individually

Solution

  • Add general "setup" methods in AbstractContractCallServiceTest that child classes can use to setup the test (accountPersist, accountPersistWithAlias, fungibleToken, etc)
  • Add customizable methods (that accept Supplier) in AbstractContractCallServiceTest that child classes can use when there is a small difference in setup of a test
    If this can be done with 1 method that serves both purposes - best.

Alternatives

No response

@filev94 filev94 added the enhancement Type: New feature label Jan 30, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Mirror Node Feb 3, 2025
@bilyana-gospodinova bilyana-gospodinova moved this from 📋 Backlog to 👷 In progress in Mirror Node Feb 3, 2025
@bilyana-gospodinova bilyana-gospodinova added the web3 Area: Web3 API label Feb 3, 2025
@filev94 filev94 mentioned this issue Feb 4, 2025
2 tasks
@filev94
Copy link
Contributor Author

filev94 commented Feb 4, 2025

This issue mentioned here SENDER_ALIAS_ SENDER_PUBLIC_KEY will be fixed in future PR

@steven-sheehy steven-sheehy moved this from 👷 In progress to 👀 In review in Mirror Node Feb 4, 2025
@steven-sheehy steven-sheehy added this to the 0.124.0 milestone Feb 4, 2025
@filev94
Copy link
Contributor Author

filev94 commented Feb 6, 2025

The issue mentioned here persistFungibleToken() will be fixed in a future PR, so that the latter does not become big.

@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Mirror Node Feb 6, 2025
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog in Mirror Node Feb 7, 2025
@bilyana-gospodinova bilyana-gospodinova moved this from 📋 Backlog to 🏃‍♀ Sprint backlog in Mirror Node Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature web3 Area: Web3 API
Projects
Status: 🏃‍♀ Sprint backlog
Development

Successfully merging a pull request may close this issue.

3 participants