Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hzlinyiyu-netease committed Jul 29, 2024
1 parent 343aacb commit 53b1040
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async fn main() {
let mut conn = pool.get().await.unwrap();
cmd("SET")
.arg(&["deadpool/test_key", "42"])
.query_async::<_, ()>(&mut conn)
.query_async::<()>(&mut conn)
.await.unwrap();
}
{
Expand Down Expand Up @@ -74,7 +74,7 @@ async fn main() {
let mut conn = pool.get().await.unwrap();
cmd("SET")
.arg(&["deadpool/test_key", "42"])
.query_async::<_, ()>(&mut conn)
.query_async::<()>(&mut conn)
.await.unwrap();
}
{
Expand Down Expand Up @@ -108,7 +108,7 @@ async fn main() {
let mut conn = pool.get().await.unwrap();
cmd("SET")
.arg(&["deadpool/test_key", "42"])
.query_async::<_, ()>(&mut conn)
.query_async::<()>(&mut conn)
.await.unwrap();
}
{
Expand Down Expand Up @@ -158,7 +158,7 @@ async fn main() {
let mut conn = pool.get().await.unwrap();
cmd("SET")
.arg(&["deadpool/test_key", "42"])
.query_async::<_, ()>(&mut conn)
.query_async::<()>(&mut conn)
.await.unwrap();
}
{
Expand Down
20 changes: 10 additions & 10 deletions redis/tests/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async fn test_aborted_command() {
// https://github.com/mitsuhiko/redis-rs/issues/489
cmd("PING")
.arg("wrong")
.query_async::<_, String>(&mut conn)
.query_async::<String>(&mut conn)
.now_or_never();
}
{
Expand All @@ -94,7 +94,7 @@ async fn test_recycled() {

cmd("CLIENT")
.arg("ID")
.query_async::<_, i64>(&mut conn)
.query_async::<i64>(&mut conn)
.await
.unwrap()
};
Expand All @@ -104,7 +104,7 @@ async fn test_recycled() {

let new_client_id = cmd("CLIENT")
.arg("ID")
.query_async::<_, i64>(&mut conn)
.query_async::<i64>(&mut conn)
.await
.unwrap();

Expand All @@ -130,13 +130,13 @@ async fn test_recycled_with_watch() {

let client_id = cmd("CLIENT")
.arg("ID")
.query_async::<_, i64>(&mut conn)
.query_async::<i64>(&mut conn)
.await
.unwrap();

cmd("WATCH")
.arg(WATCHED_KEY)
.query_async::<_, ()>(&mut conn)
.query_async::<()>(&mut conn)
.await
.unwrap();

Expand All @@ -148,7 +148,7 @@ async fn test_recycled_with_watch() {

let new_client_id = cmd("CLIENT")
.arg("ID")
.query_async::<_, i64>(&mut txn_conn)
.query_async::<i64>(&mut txn_conn)
.await
.unwrap();

Expand All @@ -161,7 +161,7 @@ async fn test_recycled_with_watch() {
// Start transaction on another key
cmd("WATCH")
.arg(TXN_KEY)
.query_async::<_, ()>(&mut txn_conn)
.query_async::<()>(&mut txn_conn)
.await
.unwrap();

Expand All @@ -172,7 +172,7 @@ async fn test_recycled_with_watch() {
cmd("SET")
.arg(WATCHED_KEY)
.arg("v")
.query_async::<_, ()>(&mut writer_conn)
.query_async::<()>(&mut writer_conn)
.await
.unwrap();
}
Expand All @@ -181,12 +181,12 @@ async fn test_recycled_with_watch() {
let txn_result = pipe()
.atomic()
.set(TXN_KEY, "foo")
.query_async::<_, Value>(&mut txn_conn)
.query_async::<Value>(&mut txn_conn)
.await
.unwrap();
assert_eq!(
txn_result,
Value::Bulk(vec![Value::Okay]),
Value::Okay,
"redis transaction in recycled connection aborted",
);
}
Expand Down
6 changes: 3 additions & 3 deletions redis/tests/redis_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async fn test_aborted_command() {
// https://github.com/mitsuhiko/redis-rs/issues/489
cmd("PING")
.arg("wrong")
.query_async::<_, String>(&mut conn)
.query_async::<String>(&mut conn)
.now_or_never();
}
{
Expand All @@ -99,7 +99,7 @@ async fn test_recycled() {

cmd("CLIENT")
.arg("ID")
.query_async::<_, i64>(&mut conn)
.query_async::<i64>(&mut conn)
.await
.unwrap()
};
Expand All @@ -109,7 +109,7 @@ async fn test_recycled() {

let new_client_id = cmd("CLIENT")
.arg("ID")
.query_async::<_, i64>(&mut conn)
.query_async::<i64>(&mut conn)
.await
.unwrap();

Expand Down

0 comments on commit 53b1040

Please sign in to comment.