stabilize test by actively check and wait till program is usable by runtime#433
Conversation
buffalojoec
left a comment
There was a problem hiding this comment.
Is it possible to instead just wait for slot 1 on the test validator before executing tests?
Yea, thought about that first, that approach might be less code, but don't like too much about replacing one assumption with another. Prefer to directly check if the program that's seeded is indeed ready for use, feel like that's more straightforward and solid for tests. Also tried to make it bit more readable by checking if |
samkim-crypto
left a comment
There was a problem hiding this comment.
The changes themselves look fine to me. Are the delay duration calculated empirically?
Having a wait_until_program_deployed() function would definitely make the code more readable and modular. I think the token program will give an error on an empty instruction data, but such error would also demonstrate that the program is usable, so that might be a more modular approach as well.
|
This kind of fix makes it seem like everyone will have to fix their tests, so why not fix this in |
|
in fav of addressing it in TestValidator: anza-xyz/agave#6587 |
Solution: