-
Notifications
You must be signed in to change notification settings - Fork 721
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
e2e: Diagnose and fix flakes #1941
Conversation
282aca2
to
3fb1691
Compare
ee8d1f7
to
5c007d0
Compare
6d14ed1
to
0180602
Compare
tests/e2e/e2e.go
Outdated
func (te *TestEnvironment) NewWalletForURI(keychain *secp256k1fx.Keychain, uri string) primary.Wallet { | ||
tests.Outf("{{blue}} initializing a new wallet {{/}}\n") | ||
func (te *TestEnvironment) NewWallet(keychain *secp256k1fx.Keychain, uri string) primary.Wallet { | ||
tests.Outf("{{blue}} initializing a new wallet for URI: %s {{/}}\n", uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we log the node ID too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would involve passing the node ID everywhere. I think it's sufficient that the node ID is logged with the node URI so that it can be easily determined for a given test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, maybe it makes more sense to use a type with fields for both node id and uri.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use a struct containing node ID and URI to facilitate logging both.
Alternatively, maybe we could put this logging into the wallet itself? |
Edit: I think it might be preferable to get traceability in now and if/when we get something implemented in the wallet we can switch to that, but that's just me. Would you prefer to see a wallet implementation instead in this PR (e.g. by providing a writer via an option)? |
bf6c33e
to
6ad8b33
Compare
@danlaine I've pivoted to log the tx id in the wallet as per your suggestion. |
@@ -126,6 +130,10 @@ func (o *Options) PollFrequency() time.Duration { | |||
return defaultPollFrequency | |||
} | |||
|
|||
func (o *Options) LogTxIDFunc() LogTxIDFunc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this as on option feels kind of weird to me. Maybe we could have a more general OnIssued
callback or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to PostIssuanceFunc
as per Stephen's suggestion.
f08546a
to
498b9e2
Compare
Rebased |
309bbb6
to
cf15c8e
Compare
d8250c1
to
8f0d467
Compare
tests/e2e/e2e.go
Outdated
return true | ||
}, DefaultTimeout, DefaultPollingInterval, "failed to see transaction acceptance before timeout") | ||
|
||
// Retrieve the contract address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops... I factored this code out of the dynamic fees test and there it was retrieving the contract address from the receipt.
Done.
This ensures that log output is produced inline ginkgo step logging when tests are executed in parallel.
5fd4391
to
a9fc55a
Compare
Why this should be merged
The high incidence of e2e flakes suggests a need to increase the details logged in testing to aid in diagnosing failure. Also, tests are made more resilient to failure.
How this works
How this was tested
CI on this PR and on PRs based on it: