Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test: fail fast in expectTxSuccess and expectTxFail #1014

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jchappelow
Copy link
Member

This is part of investigating the common "transaction not found" responses that we often receive briefly after broadcast (we should only ever get "not confirmed" or an execution result).

This updates the expectTxSuccess and expectTxFail helper functions in the test module to use require.EventuallyWithT that in theory allows a fail-fast mode. This would be very helpful when:

  • in expectTxFail we find the transaction mined and executed with code 0 (success) since there's no longer a need to keep checking
  • in expectTxSuccess when the error is something other than "not confirmed" (or for now, "not found")

However, there's a major issue with EventuallyWithT that prevents it from returning cleanly. The fix needs to be released: stretchr/testify#1396

We can easily work around this with our own "eventually" helper function, and I may do that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant