From 10dcde18ad2c02df9d0294d75cfa5ef01f53ada3 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 22 Nov 2024 15:43:01 +0200 Subject: Use specialized DBError type instead of io::Error --- log_db/tests/integration.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'log_db/tests/integration.rs') diff --git a/log_db/tests/integration.rs b/log_db/tests/integration.rs index 154423b..2d1615b 100644 --- a/log_db/tests/integration.rs +++ b/log_db/tests/integration.rs @@ -309,6 +309,7 @@ fn test_one_writer_and_multiple_reading_threads() { threads.push(thread::spawn(move || { let mut db = DB::configure() .data_dir(&data_dir) + .segment_size(1000) // should cause rotations .fields(&[(Field::Id, ValueType::int())]) .primary_key(Field::Id) .initialize() @@ -316,8 +317,6 @@ fn test_one_writer_and_multiple_reading_threads() { let mut timeout = 5; loop { - db.do_maintenance_tasks() // Run maintenance tasks on every read, just to test it - .expect("Failed to do maintenance tasks"); let result = db.get(&Value::Int(i)).expect("Failed to get record"); match result { None => { @@ -349,6 +348,9 @@ fn test_one_writer_and_multiple_reading_threads() { for i in 0..threads_n { let record = Record::from(&[Value::Int(i)]); db.upsert(&record).expect("Failed to upsert record"); + + db.do_maintenance_tasks() // Run maintenance tasks after every write, just to test it + .expect("Failed to do maintenance tasks"); } })); -- cgit v1.3