tests: stabilize TestAssetCreateWaitRestartDelete#4400
Conversation
* Ensure manager account is funded before running any operations with it * Shave 2 minutes from TestAssetCreateWaitBalLookbackDelete by introducing faster rounds on a custom proto that is already in place
algonautshant
left a comment
There was a problem hiding this comment.
Looks good.
The fix is simple and efficient.
I have another suggestion, but it is just a suggestion and it also fine as is.
| // WaitForAccountFunded waits until either the passed account gets non-empty balance | ||
| // or until the passed roundTimeout passes | ||
| // or until waiting for a round to pass times out | ||
| func (f *RestClientFixture) WaitForAccountFunded(roundTimeout uint64, accountAddress string) (err error) { |
There was a problem hiding this comment.
I think it is better to move this inside the test file.
The utility of this function in another situation is very limited, because it is not necessary to have the accountAddress in the f.AlgodClient wallet in other situations.
Alternatively, there is a simpler (perhaps less efficient) but more general function: to check for the pending transactions and wait until all pending transactions are flushed.
Also, a bit more intrusive check (but more efficient) would be to get the txid from SendPaymentFromUnencryptedWallet, and pass it here, and wait for that transaction to be accepted.
There was a problem hiding this comment.
I though about returning list of txnids from setupActors but it looked messy. Ended up with this approach.
Codecov Report
@@ Coverage Diff @@
## master #4400 +/- ##
==========================================
+ Coverage 55.56% 55.58% +0.01%
==========================================
Files 400 400
Lines 50797 50797
==========================================
+ Hits 28226 28236 +10
+ Misses 20173 20158 -15
- Partials 2398 2403 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
by introducing faster rounds on a custom proto that is already in place