From d66ede5ecf6a90640b5cda48ebcdd20919c844a1 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 1 Jul 2020 22:31:30 +0600 Subject: [PATCH] Fix tests/redis.rs --- tests/redis.rs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/tests/redis.rs b/tests/redis.rs index 86df031c..c8aee2f2 100644 --- a/tests/redis.rs +++ b/tests/redis.rs @@ -3,12 +3,9 @@ use std::{ future::Future, sync::Arc, }; -use teloxide::{ - dispatching::dialogue::{ - serializer::{Bincode, CBOR, JSON}, - RedisStorage, Serializer, Storage, - }, - prelude::*, +use teloxide::dispatching::dialogue::{ + serializer::{Bincode, CBOR, JSON}, + RedisStorage, Serializer, Storage, }; #[tokio::test] @@ -40,28 +37,33 @@ where check_dialogue( None, Arc::clone(&storage).update_dialogue(11, "ABC".to_owned()), - ); + ) + .await; check_dialogue( None, Arc::clone(&storage).update_dialogue(256, "DEF".to_owned()), - ); + ) + .await; check_dialogue( None, Arc::clone(&storage).update_dialogue(11, "GHI".to_owned()), - ); + ) + .await; check_dialogue( "ABC", Arc::clone(&storage).update_dialogue(1, "JKL".to_owned()), - ); + ) + .await; check_dialogue( "GHI", Arc::clone(&storage).update_dialogue(11, "MNO".to_owned()), - ); + ) + .await; - check_dialogue("JKL", Arc::clone(&storage).remove_dialogue(1)); - check_dialogue("DEF", Arc::clone(&storage).remove_dialogue(256)); - check_dialogue("MNO", Arc::clone(&storage).remove_dialogue(11)); + check_dialogue("JKL", Arc::clone(&storage).remove_dialogue(1)).await; + check_dialogue("DEF", Arc::clone(&storage).remove_dialogue(256)).await; + check_dialogue("MNO", Arc::clone(&storage).remove_dialogue(11)).await; } async fn check_dialogue(