Skip to content

Commit

Permalink
Fix test deadlock
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv committed May 5, 2022
1 parent 5423f6e commit 4a79933
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions integration-tests/src/frame/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ async fn transfer_implicit_subscription() {
#[tokio::test]
async fn constant_existential_deposit() {
let cxt = test_context().await;
let locked_metadata = cxt.client().metadata();
let metadata = locked_metadata.lock().await;
let balances_metadata = metadata.pallet("Balances").unwrap();
let balances_metadata = {
let locked_metadata = cxt.client().metadata();
let metadata = locked_metadata.lock().await;
metadata.pallet("Balances").unwrap().clone()
};
let constant_metadata = balances_metadata.constant("ExistentialDeposit").unwrap();
let existential_deposit = u128::decode(&mut &constant_metadata.value[..]).unwrap();
assert_eq!(existential_deposit, 100_000_000_000_000);
Expand Down

0 comments on commit 4a79933

Please sign in to comment.