diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-11-22 15:43:01 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-11-22 15:43:01 +0200 |
| commit | 10dcde18ad2c02df9d0294d75cfa5ef01f53ada3 (patch) | |
| tree | 8144790fc06c46a3377119accfa1a0ef7c0b661b /log_db/tests/integration.rs | |
| parent | 8117ffb577a6fabb182604604dcec84f1b16affa (diff) | |
Use specialized DBError type instead of io::Error
Diffstat (limited to 'log_db/tests/integration.rs')
| -rw-r--r-- | log_db/tests/integration.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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"); } })); |
