@@ -706,8 +706,13 @@ mod tests {
706706 // But we verify that IF it fails, it's with an expected error type
707707 if let Err ( err) = result {
708708 match err {
709- ChronDBError :: SetupFailed ( _) | ChronDBError :: IsolateCreationFailed => {
710- // Expected error types when library is not found or fails to load
709+ ChronDBError :: SetupFailed ( _)
710+ | ChronDBError :: IsolateCreationFailed
711+ | ChronDBError :: OpenFailed ( _) => {
712+ // Expected error types:
713+ // - SetupFailed: library not found
714+ // - IsolateCreationFailed: GraalVM isolate couldn't be created
715+ // - OpenFailed: library found but database open failed (e.g., path issues)
711716 }
712717 other => panic ! ( "Unexpected error type: {}" , other) ,
713718 }
@@ -824,6 +829,13 @@ mod tests {
824829 // db drops here, simulating process exit
825830 }
826831
832+ // Remove stale Lucene lock (cleanup code uses lsof which doesn't work
833+ // when the same process creates multiple GraalVM isolates)
834+ let lock_file = std:: path:: Path :: new ( index_str) . join ( "write.lock" ) ;
835+ if lock_file. exists ( ) {
836+ let _ = std:: fs:: remove_file ( & lock_file) ;
837+ }
838+
827839 // === Second "process" - reopen and verify ===
828840 {
829841 let db = ChronDB :: open ( data_str, index_str)
0 commit comments