Skip to content

Commit

Permalink
feat: use cache_path in test
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Dec 29, 2023
1 parent 1408487 commit 2ae9523
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mito2/src/cache/file_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ mod tests {
let region_id = RegionId::new(2000, 0);
let file_id = FileId::random();
let key = (region_id, file_id);
let file_path = cache_file_path(&cache.file_dir, key);
let file_path = cache.cache_file_path(key);

// Get an empty file.
assert!(cache.reader(key).await.is_none());
Expand Down Expand Up @@ -301,7 +301,7 @@ mod tests {
let region_id = RegionId::new(2000, 0);
let file_id = FileId::random();
let key = (region_id, file_id);
let file_path = cache_file_path(&cache.file_dir, key);
let file_path = cache.cache_file_path(key);

// Write a file.
local_store
Expand Down Expand Up @@ -338,7 +338,7 @@ mod tests {
let file_ids: Vec<_> = (0..10).map(|_| FileId::random()).collect();
for (i, file_id) in file_ids.iter().enumerate() {
let key = (region_id, *file_id);
let file_path = cache_file_path(&cache.file_dir, key);
let file_path = cache.cache_file_path(key);
let bytes = i.to_string().into_bytes();
local_store.write(&file_path, bytes.clone()).await.unwrap();

Expand Down

0 comments on commit 2ae9523

Please sign in to comment.