mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-22 19:41:03 +00:00
Remove transaction from test search::tests::search for CI
This commit is contained in:
parent
6dd730030d
commit
c3c8f6804b
1 changed files with 29 additions and 36 deletions
|
@ -114,9 +114,6 @@ mod tests {
|
|||
let conn = db_pool.clone().get().unwrap();
|
||||
|
||||
let title = random_hex()[..8].to_owned();
|
||||
let mut post_id = 0;
|
||||
let (instance, user, blog, post) = &conn
|
||||
.transaction::<(Instance, User, Blog, Post), diesel::result::Error, _>(|| {
|
||||
let (instance, user, blog) = fill_database(&conn);
|
||||
let author = &blog.list_authors(&conn).unwrap()[0];
|
||||
|
||||
|
@ -145,11 +142,7 @@ mod tests {
|
|||
},
|
||||
)
|
||||
.unwrap();
|
||||
post_id = post.id;
|
||||
|
||||
Ok((instance, user, blog, post))
|
||||
})
|
||||
.unwrap();
|
||||
let post_id = post.id;
|
||||
|
||||
// Wait for searcher on another thread add document asynchronously
|
||||
sleep(Duration::from_millis(700));
|
||||
|
@ -162,7 +155,7 @@ mod tests {
|
|||
post.delete(&conn).unwrap();
|
||||
blog.delete(&conn).unwrap();
|
||||
user.delete(&conn).unwrap();
|
||||
diesel::delete(instance).execute(&conn).unwrap();
|
||||
diesel::delete(&instance).execute(&conn).unwrap();
|
||||
}
|
||||
|
||||
fn fill_database(conn: &Conn) -> (Instance, User, Blog) {
|
||||
|
|
Loading…
Reference in a new issue