mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Close write transaction in test
This commit is contained in:
parent
7ac441e473
commit
ce0315a10f
1 changed files with 2 additions and 0 deletions
|
@ -1053,6 +1053,7 @@ mod tests {
|
||||||
|
|
||||||
let err = builder.execute(|_, _| ()).unwrap_err();
|
let err = builder.execute(|_, _| ()).unwrap_err();
|
||||||
assert!(matches!(err, Error::UserError(UserError::PrimaryKeyCannotBeReset)));
|
assert!(matches!(err, Error::UserError(UserError::PrimaryKeyCannotBeReset)));
|
||||||
|
wtxn.abort().unwrap();
|
||||||
|
|
||||||
// But if we clear the database...
|
// But if we clear the database...
|
||||||
let mut wtxn = index.write_txn().unwrap();
|
let mut wtxn = index.write_txn().unwrap();
|
||||||
|
@ -1063,5 +1064,6 @@ mod tests {
|
||||||
let mut builder = Settings::new(&mut wtxn, &index, 0);
|
let mut builder = Settings::new(&mut wtxn, &index, 0);
|
||||||
builder.set_primary_key(S("myid"));
|
builder.set_primary_key(S("myid"));
|
||||||
builder.execute(|_, _| ()).unwrap();
|
builder.execute(|_, _| ()).unwrap();
|
||||||
|
wtxn.commit().unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue