state_store: use tokio Mutex in state store tests

This commit is contained in:
Devin R 2020-04-27 07:23:59 -04:00
parent 6fcf0a86f9
commit 199fb59a76

View file

@ -142,12 +142,13 @@ mod test {
use std::convert::TryFrom;
use std::fs;
use std::future::Future;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Mutex;
use lazy_static::lazy_static;
use mockito::{mock, Matcher};
use tokio::sync::Mutex;
use crate::identifiers::{RoomId, UserId};
use crate::{AsyncClient, AsyncClientConfig, Session, SyncSettings};
@ -168,9 +169,9 @@ mod test {
async fn run_and_cleanup<Fut>(test: fn() -> Fut)
where
Fut: std::future::Future<Output = ()>,
Fut: Future<Output = ()>,
{
let _lock = MTX.lock();
let _lock = MTX.lock().await;
test().await;