From ce0315a10f2052fd3c30cd89b89131836912f33d Mon Sep 17 00:00:00 2001 From: many Date: Tue, 15 Jun 2021 17:49:15 +0200 Subject: [PATCH] Close write transaction in test --- milli/src/update/settings.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/milli/src/update/settings.rs b/milli/src/update/settings.rs index 39cb27c00..8f4fe48c9 100644 --- a/milli/src/update/settings.rs +++ b/milli/src/update/settings.rs @@ -1053,6 +1053,7 @@ mod tests { let err = builder.execute(|_, _| ()).unwrap_err(); assert!(matches!(err, Error::UserError(UserError::PrimaryKeyCannotBeReset))); + wtxn.abort().unwrap(); // But if we clear the database... let mut wtxn = index.write_txn().unwrap(); @@ -1063,5 +1064,6 @@ mod tests { let mut builder = Settings::new(&mut wtxn, &index, 0); builder.set_primary_key(S("myid")); builder.execute(|_, _| ()).unwrap(); + wtxn.commit().unwrap(); } }