mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-19 13:00:40 +00:00
chore: upgrade lance to 6.0.0-beta.1 (#3281)
This commit is contained in:
@@ -285,7 +285,10 @@ mod tests {
|
||||
|
||||
use super::*;
|
||||
|
||||
use crate::{connect, io::object_store::io_tracking::IoStatsHolder, table::WriteOptions};
|
||||
use crate::{
|
||||
connect, io::object_store::io_tracking::IoStatsHolder, table::WriteOptions,
|
||||
utils::background_cache::clock,
|
||||
};
|
||||
|
||||
async fn create_test_dataset(uri: &str) -> Dataset {
|
||||
let schema = Arc::new(Schema::new(vec![Field::new("id", DataType::Int32, false)]));
|
||||
@@ -463,6 +466,10 @@ mod tests {
|
||||
let uri = dir.path().to_str().unwrap();
|
||||
let ds = create_test_dataset(uri).await;
|
||||
|
||||
// Other tests use a thread-local mock clock. Simulate leaked state from a
|
||||
// previous test to ensure this wrapper starts from real time.
|
||||
clock::advance_by(Duration::from_secs(60));
|
||||
|
||||
let wrapper = DatasetConsistencyWrapper::new_latest(ds, Some(Duration::from_millis(200)));
|
||||
|
||||
// Populate the cache
|
||||
|
||||
@@ -107,6 +107,14 @@ where
|
||||
refresh_window < ttl,
|
||||
"refresh_window ({refresh_window:?}) must be less than ttl ({ttl:?})"
|
||||
);
|
||||
#[cfg(test)]
|
||||
{
|
||||
// Tests may advance the thread-local mock clock and leave it behind for
|
||||
// the next test that happens to run on the same worker thread. Each new
|
||||
// cache should start from a clean clock state instead of inheriting
|
||||
// unrelated mock time from a previous test.
|
||||
clock::clear_mock();
|
||||
}
|
||||
Self {
|
||||
inner: Arc::new(Mutex::new(CacheInner {
|
||||
state: State::Empty,
|
||||
|
||||
Reference in New Issue
Block a user