Fixed a test of the vector stores which failed on Windows

This commit is contained in:
Thorsten Sommer committed 2026-11-26 15:03:43 +01:00
1 parent fe71fa844a
commit 0bb4b4c0db
1 file changed
+4 -1
+4 -1
View File
@@ -2018,10 +2018,13 @@ mod tests {
database.search_embedding(SEARCH_STORE, search_vector(), 3, None, &[]).unwrap(); database.search_embedding(SEARCH_STORE, search_vector(), 3, None, &[]).unwrap();
assert_eq!(payload_indexes(&database).len(), INDEXED_PAYLOAD_FIELDS.len()); assert_eq!(payload_indexes(&database).len(), INDEXED_PAYLOAD_FIELDS.len());
// On Windows, an open WAL locks the file `.wal` in its directory against every other handle,
// so the WAL can be read only after the store is closed, just like before it was loaded:
drop(database);
// Not assert_eq: on failure, it would print every byte of the WAL. // Not assert_eq: on failure, it would print every byte of the WAL.
assert!(file_contents(&wal_path) == wal, "loading the store left its WAL as it was"); assert!(file_contents(&wal_path) == wal, "loading the store left its WAL as it was");
drop(database);
fs::remove_dir_all(test_directory).unwrap(); fs::remove_dir_all(test_directory).unwrap();
} }