Fix FFLAGS
import and warnings in tests (#4010)
This commit is contained in:
parent
4458146b94
commit
f607703f7e
7 changed files with 15 additions and 21 deletions
core/src/kvs
lib/tests
|
@ -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];
|
||||
|
|
|
@ -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"))),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use crate::fflags::FFLAGS;
|
||||
use crate::kvs::lq_structs::{LqIndexKey, LqIndexValue, LqSelector};
|
||||
use uuid::Uuid;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue