@@ -366,7 +366,7 @@ async fn test_prover_fullnode_commitment_sync_with_racing_transactions() {
366
366
let mut prover_synced = false ;
367
367
let mut fullnode_synced = false ;
368
368
369
- for _ in 0 ..50 {
369
+ for _ in 0 ..10 {
370
370
// 5 second timeout
371
371
let prover_height = prover. get_db ( ) . get_last_synced_height ( ) . unwrap_or ( 0 ) ;
372
372
let fullnode_height = fullnode. get_db ( ) . get_last_synced_height ( ) . unwrap_or ( 0 ) ;
@@ -383,7 +383,7 @@ async fn test_prover_fullnode_commitment_sync_with_racing_transactions() {
383
383
break ;
384
384
}
385
385
386
- tokio:: time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
386
+ tokio:: time:: sleep ( Duration :: from_millis ( 500 ) ) . await ;
387
387
}
388
388
389
389
assert ! (
@@ -401,7 +401,7 @@ async fn test_prover_fullnode_commitment_sync_with_racing_transactions() {
401
401
}
402
402
403
403
// Wait a bit for transactions to be processed
404
- tokio:: time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
404
+ tokio:: time:: sleep ( Duration :: from_millis ( 150 ) ) . await ;
405
405
406
406
// Submit racing transactions that arrive while prover is creating proof
407
407
for transaction in racing_transactions {
@@ -419,8 +419,9 @@ async fn test_prover_fullnode_commitment_sync_with_racing_transactions() {
419
419
assert ! ( epoch_found, "Prover should have created an epoch" ) ;
420
420
421
421
// Wait for fullnode to sync the epoch
422
- // If this test flakes, it could be because it needs a tiny bit more time here
423
- tokio:: time:: sleep ( Duration :: from_millis ( 5000 ) ) . await ;
422
+ while prover. get_commitment ( ) . await . unwrap ( ) != fullnode. get_commitment ( ) . await . unwrap ( ) {
423
+ tokio:: time:: sleep ( Duration :: from_millis ( 200 ) ) . await ;
424
+ }
424
425
425
426
// Both nodes should have the same commitment despite racing transactions
426
427
let prover_commitment = prover. get_commitment ( ) . await . unwrap ( ) ;
0 commit comments