TestValidator checks usability of programs added to genesis during startup#6587
Conversation
446b7f0 to
81c2dbb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6587 +/- ##
========================================
Coverage 82.8% 82.8%
========================================
Files 849 849
Lines 379032 379147 +115
========================================
+ Hits 313911 314116 +205
+ Misses 65121 65031 -90 🚀 New features to boost your workflow:
|
| rpc_client.get_health().await.expect("health"); | ||
| } | ||
|
|
||
| #[test] |
There was a problem hiding this comment.
Add tests to assert program added to genesis is available for use after TestValidator started.
To illustrate issue, if short circuit wait_for_nonzero_fee() by returning immediately (to simulate removing the hack) and disable wait_for_upgradeable_programs_deployed() (to simulate no change), these two tests will fail.
| blockhash, | ||
| ); | ||
| match rpc_client.send_transaction(&transaction).await { | ||
| Ok(_) => println!("{:?} - OK", program_id), |
There was a problem hiding this comment.
better to use the normal log functions.
| loop { | ||
| let blockhash = rpc_client.get_latest_blockhash().await.unwrap(); | ||
| let mut all_deployed = true; | ||
| for program_id in upgradeable_programs { |
There was a problem hiding this comment.
If the program_id has been successful in previous iterations, we don't have to resend
Problem
Summary of Changes
Actively check for "Program is not deployed", wait till program becomes usable.
Fixes #