mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 00:45:37 +01:00
Fix concurrency test
It was accidentally using row ID as transaction ID...
This commit is contained in:
@@ -4,7 +4,6 @@ use shuttle::sync::Arc;
|
||||
use shuttle::thread;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn test_non_overlapping_concurrent_inserts() {
|
||||
// Two threads insert to the database concurrently using non-overlapping
|
||||
@@ -24,7 +23,7 @@ fn test_non_overlapping_concurrent_inserts() {
|
||||
id,
|
||||
data: "Hello".to_string(),
|
||||
};
|
||||
db.insert(id, row.clone()).unwrap();
|
||||
db.insert(tx, row.clone()).unwrap();
|
||||
db.commit_tx(tx);
|
||||
let tx = db.begin_tx();
|
||||
let committed_row = db.read(tx, id).unwrap();
|
||||
@@ -42,7 +41,7 @@ fn test_non_overlapping_concurrent_inserts() {
|
||||
id,
|
||||
data: "World".to_string(),
|
||||
};
|
||||
db.insert(id, row.clone()).unwrap();
|
||||
db.insert(tx, row.clone()).unwrap();
|
||||
db.commit_tx(tx);
|
||||
let tx = db.begin_tx();
|
||||
let committed_row = db.read(tx, id).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user