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 OnRecvPacket test in transfer #4598

Closed
3 tasks
colin-axner opened this issue Sep 7, 2023 · 1 comment · Fixed by #6321
Closed
3 tasks

Refactor OnRecvPacket test in transfer #4598

colin-axner opened this issue Sep 7, 2023 · 1 comment · Fixed by #6321
Assignees
Labels
testing Testing package and unit/integration tests

Comments

@colin-axner
Copy link
Contributor

Summary

This test should be refactored to reduce setup/verification complexity.

Problem Definition

The test is trying to test many cases in addition to asserting various expected results. This has become difficult to maintain as new features tend to insert their setup/exp result assertions into the body of the for loop iterating over test cases.

Proposal

We should simplify rework this test to separate concerns. I don't have a concrete proposal atm, mostly opening for signaling. It's possible this might be achieved by cleaning up the main handlers to separate concerns (currently logic for if a recv is the source chain or not the source chain are bundled into the same handler rather than being brought into smaller private functions).


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner colin-axner added the testing Testing package and unit/integration tests label Sep 7, 2023
@crodriguezvega
Copy link
Contributor

crodriguezvega commented Sep 7, 2023

I was thinking the same thing. Every time I have to do something with that test, I get a headache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Testing package and unit/integration tests
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

2 participants