pinakes-core: update remaining modules and tests
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9e0ff5ea33a5cf697473423e88f167ce6a6a6964
This commit is contained in:
parent
c8425a4c34
commit
3d9f8933d2
44 changed files with 1207 additions and 578 deletions
|
|
@ -158,13 +158,13 @@ async fn test_large_directory_performance() {
|
|||
storage.add_root_dir(root_dir.clone()).await.unwrap();
|
||||
|
||||
for i in 0..1000 {
|
||||
let file_path = root_dir.join(format!("file_{}.mp3", i));
|
||||
fs::write(&file_path, format!("content {}", i)).unwrap();
|
||||
let file_path = root_dir.join(format!("file_{i}.mp3"));
|
||||
fs::write(&file_path, format!("content {i}")).unwrap();
|
||||
}
|
||||
|
||||
for i in 0..500 {
|
||||
let file_path = root_dir.join(format!("file_{}.mp3", i));
|
||||
let item = create_test_media_item(file_path, &format!("hash_{}", i));
|
||||
let file_path = root_dir.join(format!("file_{i}.mp3"));
|
||||
let item = create_test_media_item(file_path, &format!("hash_{i}"));
|
||||
storage.insert_media(&item).await.unwrap();
|
||||
}
|
||||
|
||||
|
|
@ -174,8 +174,7 @@ async fn test_large_directory_performance() {
|
|||
|
||||
assert!(
|
||||
elapsed.as_secs() < 5,
|
||||
"Detection took too long: {:?}",
|
||||
elapsed
|
||||
"Detection took too long: {elapsed:?}"
|
||||
);
|
||||
|
||||
assert_eq!(report.untracked_paths.len(), 500);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue