From c50630518ef3e3908d3c66f8f24095f9302ce444 Mon Sep 17 00:00:00 2001 From: Alin Dima Date: Wed, 2 Oct 2024 10:37:51 +0300 Subject: [PATCH] fix prospective parachains test to use shuffled candidate list (#5880) Fixes https://github.com/paritytech/polkadot-sdk/issues/5617 --- .../src/fragment_chain/tests.rs | 2 +- prdoc/pr_5880.prdoc | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_5880.prdoc diff --git a/polkadot/node/core/prospective-parachains/src/fragment_chain/tests.rs b/polkadot/node/core/prospective-parachains/src/fragment_chain/tests.rs index 9886d19e5224..3332cbeb03cb 100644 --- a/polkadot/node/core/prospective-parachains/src/fragment_chain/tests.rs +++ b/polkadot/node/core/prospective-parachains/src/fragment_chain/tests.rs @@ -1433,7 +1433,7 @@ fn test_find_ancestor_path_and_find_backable_chain() { // Now back all candidates. Back them in a random order. The result should always be the same. let mut candidates_shuffled = candidates.clone(); candidates_shuffled.shuffle(&mut thread_rng()); - for candidate in candidates.iter() { + for candidate in candidates_shuffled.iter() { chain.candidate_backed(candidate); storage.mark_backed(candidate); } diff --git a/prdoc/pr_5880.prdoc b/prdoc/pr_5880.prdoc new file mode 100644 index 000000000000..b246bff11f8d --- /dev/null +++ b/prdoc/pr_5880.prdoc @@ -0,0 +1,11 @@ +title: Fix prospective parachains test to use shuffled candidate list + +doc: + - audience: Node Dev + description: | + Fix prospective parachains test to use shuffled candidate list. + Resolves https://github.com/paritytech/polkadot-sdk/issues/5617. + +crates: + - name: polkadot-node-core-prospective-parachains + bump: none