From e49d6f5e46e40adfc98bc2ae2b6663746cd1bf5d Mon Sep 17 00:00:00 2001 From: Jeff Baskin Date: Thu, 13 Jul 2023 09:39:25 -0400 Subject: [PATCH] Completed duplicate database in multiple sessions. --- src/morethantext/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/morethantext/mod.rs b/src/morethantext/mod.rs index 81de5b9..98157e9 100644 --- a/src/morethantext/mod.rs +++ b/src/morethantext/mod.rs @@ -162,7 +162,10 @@ mod mtt { let output = mtt2.commit(store2).await; match output { Ok(_) => assert!(false, "Should have returned an error"), - Err(_) => (), + Err(err) => match err.code { + ErrorCode::DuplicateDatabase(_) => (), + _ => assert!(false, "{:?} is not ErrorCode::DuplicateDatabase", err.code), + }, } } }