Skip to content

Commit c02ef08

Browse files
committed
Update test to use multi thread runtime
1 parent ec2fe63 commit c02ef08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ use redis::Connection;
22
use redis::RedisError;
33
use redis::Value;
44
use rustdis::server::run;
5+
56
use tokio::time::{sleep, Duration};
67

78
async fn connect() -> Result<(Connection, Connection), RedisError> {
89
tokio::spawn(async { run().await });
9-
// Give the server some time to start.
1010
sleep(Duration::from_millis(100)).await;
1111

1212
let our_client = redis::Client::open("redis://127.0.0.1:6378/")?;
@@ -18,7 +18,7 @@ async fn connect() -> Result<(Connection, Connection), RedisError> {
1818
Ok((our_connection, their_connection))
1919
}
2020

21-
#[tokio::test]
21+
#[tokio::test(flavor = "multi_thread")]
2222
async fn test_set_and_get() {
2323
let (mut our_connection, mut their_connection) = connect().await.unwrap();
2424

@@ -35,5 +35,5 @@ async fn test_set_and_get() {
3535
let their_response: (Value, Value, Value, Value, Value) =
3636
pipeline.clone().query(&mut their_connection).unwrap();
3737

38-
assert_eq!(our_response, their_response)
38+
assert_eq!(our_response, their_response);
3939
}

0 commit comments

Comments
 (0)