Close write transaction in test

This commit is contained in:
many 2021-06-15 17:49:15 +02:00 committed by Kerollmops
parent 7ac441e473
commit ce0315a10f
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -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();
}
}