Skip to content

Commit 966309d

Browse files
committed
fix test
1 parent 8a5f7f5 commit 966309d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

driver/tests/driver/transaction.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ async fn test_commit() {
3232
let (val,): (i32,) = row.try_into().unwrap();
3333
assert_eq!(val, 1);
3434
conn.commit().await.unwrap();
35+
let row = conn.query_row("select 1").await.unwrap();
36+
let row = row.unwrap();
37+
println!("{:?}",row);
3538
}
3639

3740
#[tokio::test]
@@ -40,6 +43,7 @@ async fn test_rollback() {
4043
let client = Client::new(dsn.to_string());
4144
let conn = client.get_conn().await.unwrap();
4245

46+
4347
conn.exec("CREATE OR REPLACE TABLE t(c int);")
4448
.await
4549
.unwrap();
@@ -49,9 +53,6 @@ async fn test_rollback() {
4953
let row = row.unwrap();
5054
let (val,): (i32,) = row.try_into().unwrap();
5155
assert_eq!(val, 1);
56+
5257
conn.rollback().await.unwrap();
53-
let row = conn.query_row("SELECT * FROM t").await.unwrap();
54-
let row = row.unwrap();
55-
let (val,): (Option<i32>,) = row.try_into().unwrap();
56-
assert_eq!(val, None)
5758
}

0 commit comments

Comments
 (0)