mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
remove flakiness (#5572)
This commit is contained in:
@@ -221,7 +221,7 @@ fn should_revalidate_during_maintenance() {
|
||||
|
||||
block_on(pool.maintain(block_event(1)));
|
||||
assert_eq!(pool.status().ready, 1);
|
||||
block_on(notifier.next_blocking());
|
||||
block_on(notifier.next());
|
||||
|
||||
// test that pool revalidated transaction that left ready and not included in the block
|
||||
assert_eq!(pool.api.validation_requests().len(), 3);
|
||||
@@ -264,8 +264,8 @@ fn should_not_retain_invalid_hashes_from_retracted() {
|
||||
|
||||
block_on(pool.maintain(event));
|
||||
// maintenance is in background
|
||||
block_on(notifier.next_blocking());
|
||||
|
||||
block_on(notifier.next());
|
||||
|
||||
assert_eq!(pool.status().ready, 0);
|
||||
}
|
||||
|
||||
@@ -281,7 +281,6 @@ fn should_revalidate_transaction_multiple_times() {
|
||||
pool.api.push_block(1, vec![xt.clone()]);
|
||||
|
||||
block_on(pool.maintain(block_event(1)));
|
||||
block_on(notifier.next_blocking());
|
||||
|
||||
block_on(pool.submit_one(&BlockId::number(0), SOURCE, xt.clone())).expect("1. Imported");
|
||||
assert_eq!(pool.status().ready, 1);
|
||||
@@ -290,7 +289,7 @@ fn should_revalidate_transaction_multiple_times() {
|
||||
pool.api.add_invalid(&xt);
|
||||
|
||||
block_on(pool.maintain(block_event(2)));
|
||||
block_on(notifier.next_blocking());
|
||||
block_on(notifier.next());
|
||||
|
||||
assert_eq!(pool.status().ready, 0);
|
||||
}
|
||||
@@ -309,14 +308,14 @@ fn should_revalidate_across_many_blocks() {
|
||||
|
||||
pool.api.push_block(1, vec![]);
|
||||
block_on(pool.maintain(block_event(1)));
|
||||
block_on(notifier.next_blocking());
|
||||
block_on(notifier.next());
|
||||
|
||||
block_on(pool.submit_one(&BlockId::number(2), SOURCE, xt3.clone())).expect("1. Imported");
|
||||
assert_eq!(pool.status().ready, 3);
|
||||
|
||||
pool.api.push_block(2, vec![xt1.clone()]);
|
||||
block_on(pool.maintain(block_event(2)));
|
||||
block_on(notifier.next_blocking());
|
||||
block_on(notifier.next());
|
||||
|
||||
assert_eq!(pool.status().ready, 2);
|
||||
// xt1 and xt2 validated twice, then xt3 once, then xt2 and xt3 again
|
||||
@@ -361,7 +360,7 @@ fn should_push_watchers_during_maintaince() {
|
||||
|
||||
// clear timer events if any
|
||||
block_on(pool.maintain(block_event(0)));
|
||||
block_on(notifier.next_blocking());
|
||||
block_on(notifier.next());
|
||||
|
||||
// then
|
||||
// hash3 is now invalid
|
||||
|
||||
Reference in New Issue
Block a user