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 sponsorship integration tests #3075

Closed
2opremio opened this issue Sep 29, 2020 · 2 comments · Fixed by #3090
Closed

Refactor sponsorship integration tests #3075

2opremio opened this issue Sep 29, 2020 · 2 comments · Fixed by #3090

Comments

@2opremio
Copy link
Contributor

  • They are really verbose.
  • They use assert.Eventually which apparently isn't necessary (Horizon seems to guarantee strict ordering after submitting a transaction).
  • Part of the machinery could be moved into the integration-test infrastructure.
  • Test could potentially be merged (they all follow a similar workflow). It may not be possible since different tests have different particularities (e.g. claimable balances cannot be explicitly revoked).
@Shaptic
Copy link
Contributor

Shaptic commented Sep 29, 2020

I haven't been exposed much to the sponsorship tests, and it would be good to familiarize myself with that side of the Protocol 14 changes. Do you mind if I pick this up?

@Shaptic Shaptic self-assigned this Sep 29, 2020
@2opremio
Copy link
Contributor Author

Of course not, go ahead!

Shaptic added a commit that referenced this issue Oct 7, 2020
… & flexibility. (#3090)

Refactors the sponsorship (CAP-33) integration tests:
 - Each test is independently runs as a sub-test of the  "TestSponsorships" test.
 - It introduces helper functions commonly used in each tests such as
   sandwiching sponsored operations, retrieving operations and effects, and
   confirming the existence of operations via `tt.Condition`.
 - `itest.MustGetAccount()` replaces instances of a manual force-retrieval of an
   account, and account/keypair management in general is simpler.
 - Running time is ~3x faster.

All of the actual _testing_ is still the same. Investigation on using 
`testing.T.Parallel` is in progress which should further improve running time.

Closes #3075.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants