Added backend options as features.
This commit is contained in:
@@ -4,6 +4,11 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[features]
|
||||
default = ["sqlite"]
|
||||
sqlite = ["store/sqlite"]
|
||||
foundationdb = ["store/foundation"]
|
||||
|
||||
[dev-dependencies]
|
||||
store = { path = "../crates/store", features = ["test_mode"] }
|
||||
jmap = { path = "../crates/jmap", features = ["test_mode"] }
|
||||
|
||||
@@ -30,16 +30,16 @@ use store::{write::BatchBuilder, Store};
|
||||
pub async fn test(db: Arc<Store>) {
|
||||
println!("Running Store ID assignment tests...");
|
||||
|
||||
store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
|
||||
.store(2, std::sync::atomic::Ordering::Relaxed);
|
||||
/*store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
|
||||
.store(2, std::sync::atomic::Ordering::Relaxed);*/
|
||||
|
||||
test_1(db.clone()).await;
|
||||
test_2(db.clone()).await;
|
||||
test_3(db.clone()).await;
|
||||
test_4(db).await;
|
||||
|
||||
store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
|
||||
.store(60 * 60, std::sync::atomic::Ordering::Relaxed);
|
||||
/*store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
|
||||
.store(60 * 60, std::sync::atomic::Ordering::Relaxed);*/
|
||||
}
|
||||
|
||||
async fn test_1(db: Arc<Store>) {
|
||||
|
||||
Reference in New Issue
Block a user