From b546ba95779c463f840adc0cf32a911556acf905 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 4 Oct 2023 14:48:53 +0200 Subject: [PATCH 1/2] prevent test from running concurently --- pallets/xyk/src/tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/xyk/src/tests.rs b/pallets/xyk/src/tests.rs index 47861dc9ea..f148ec6140 100644 --- a/pallets/xyk/src/tests.rs +++ b/pallets/xyk/src/tests.rs @@ -772,6 +772,7 @@ fn sell_N_zero_amount() { } #[test] +#[serial] fn multiswap_sell_W() { new_test_ext().execute_with(|| { System::set_block_number(1); From 7ced5e369d547d28d0c007c437e14f785fb1f3f5 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 4 Oct 2023 15:14:02 +0200 Subject: [PATCH 2/2] annotate remaining tests --- pallets/xyk/src/tests.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pallets/xyk/src/tests.rs b/pallets/xyk/src/tests.rs index f148ec6140..9ffe728bf7 100644 --- a/pallets/xyk/src/tests.rs +++ b/pallets/xyk/src/tests.rs @@ -1046,6 +1046,7 @@ fn multiswap_sell_just_enough_assets_pay_fee_but_not_to_swap_W() { } #[test] +#[serial] fn multiswap_sell_with_two_hops_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1071,6 +1072,7 @@ fn multiswap_sell_with_two_hops_W() { } #[test] +#[serial] fn multiswap_sell_with_single_hops_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1085,6 +1087,7 @@ fn multiswap_sell_with_single_hops_W() { } #[test] +#[serial] fn multiswap_sell_same_pool_works_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1124,6 +1127,7 @@ fn multiswap_sell_same_pool_works_W() { } #[test] +#[serial] fn multiswap_sell_loop_works_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1384,6 +1388,7 @@ fn buy_N_zero_amount() { } #[test] +#[serial] fn multiswap_buy_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1441,6 +1446,7 @@ fn multiswap_buy_W() { } #[test] +#[serial] fn multiswap_buy_bad_slippage_charges_fee_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1495,6 +1501,7 @@ fn multiswap_buy_bad_slippage_charges_fee_W() { } #[test] +#[serial] fn multiswap_buy_bad_atomic_swap_charges_fee_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1552,6 +1559,7 @@ fn multiswap_buy_bad_atomic_swap_charges_fee_W() { } #[test] +#[serial] fn multiswap_buy_not_enough_assets_pay_fees_fails_early_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1602,6 +1610,7 @@ fn multiswap_buy_not_enough_assets_pay_fees_fails_early_W() { } #[test] +#[serial] fn multiswap_buy_just_enough_assets_pay_fee_but_not_to_swap_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1664,6 +1673,7 @@ fn multiswap_buy_just_enough_assets_pay_fee_but_not_to_swap_W() { } #[test] +#[serial] fn multiswap_buy_with_two_hops_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1689,6 +1699,7 @@ fn multiswap_buy_with_two_hops_W() { } #[test] +#[serial] fn multiswap_buy_with_single_hops_W() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1703,6 +1714,7 @@ fn multiswap_buy_with_single_hops_W() { } #[test] +#[serial] fn multiswap_buy_same_pool_does_not_work_N() { new_test_ext().execute_with(|| { System::set_block_number(1); @@ -1721,6 +1733,7 @@ fn multiswap_buy_same_pool_does_not_work_N() { } #[test] +#[serial] fn multiswap_buy_loop_does_not_work_N() { new_test_ext().execute_with(|| { System::set_block_number(1);