Fix FFLAGS import and warnings in tests ()

This commit is contained in:
Rushmore Mushambi 2024-05-09 23:14:03 +02:00 committed by GitHub
parent 4458146b94
commit f607703f7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 21 deletions

View file

@ -292,21 +292,18 @@ mod test {
tracker.register_live_query(&lq1, DEFAULT_WATERMARK).unwrap();
// Check watermark is "default"
let selector = {
let wms = tracker.get_watermarks();
assert_eq!(wms.len(), 1);
let (selector, watermark) = wms.iter().next().unwrap();
assert_eq!(
selector,
&LqSelector {
ns: NS.to_string(),
db: DB.to_string(),
tb: TB.to_string(),
}
);
assert_eq!(watermark, &DEFAULT_WATERMARK);
selector.clone()
};
let wms = tracker.get_watermarks();
assert_eq!(wms.len(), 1);
let (selector, watermark) = wms.iter().next().unwrap();
assert_eq!(
selector,
&LqSelector {
ns: NS.to_string(),
db: DB.to_string(),
tb: TB.to_string(),
}
);
assert_eq!(watermark, &DEFAULT_WATERMARK);
// Progress the watermark
let progressed_watermark = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

View file

@ -189,7 +189,6 @@ mod test_check_lqs_and_send_notifications {
ns: String,
db: String,
tb: String,
rid: Value,
}
async fn setup_test_suite_init() -> TestSuite {
@ -222,7 +221,6 @@ mod test_check_lqs_and_send_notifications {
ns: ns.to_string(),
db: db.to_string(),
tb: tb.to_string(),
rid: Value::Thing(Thing::from(("user", "test"))),
}
}

View file

@ -1,3 +1,4 @@
use crate::fflags::FFLAGS;
use crate::kvs::lq_structs::{LqIndexKey, LqIndexValue, LqSelector};
use uuid::Uuid;

View file

@ -34,7 +34,6 @@ type ClockType = Arc<SizedClock>;
#[cfg(feature = "kv-mem")]
mod mem {
use crate::fflags::FFLAGS;
use crate::kvs::tests::{ClockType, Kvs};
use crate::kvs::Datastore;
use crate::kvs::LockType;

View file

@ -1,5 +1,3 @@
use crate::key;
// Timestamp to versionstamp tests
// This translation mechanism is currently used by the garbage collector to determine which change feed entries to delete.
//

View file

@ -402,7 +402,7 @@ async fn receive_all_pending_notifications<
S: Stream<Item = Result<Notification<I>, Error>> + Unpin,
I,
>(
mut stream: Arc<RwLock<S>>,
stream: Arc<RwLock<S>>,
timeout: Duration,
) -> Vec<Notification<I>> {
let (send, mut recv) = channel::<Notification<I>>(MAX_NOTIFICATIONS);

View file

@ -3,6 +3,7 @@ use surrealdb::sql::value;
use surrealdb::sql::Thing;
use surrealdb::sql::Value;
#[allow(dead_code)]
pub trait Parse<T> {
fn parse(val: &str) -> T;
}