test: clean up compact event assertion
This commit is contained in:
parent
2109733cb7
commit
7054a179d4
|
|
@ -786,7 +786,6 @@ async fn controller_compact_method_emits_start_and_done() {
|
||||||
|
|
||||||
handle.send(Method::Compact).await.expect("send compact");
|
handle.send(Method::Compact).await.expect("send compact");
|
||||||
let mut saw_start = false;
|
let mut saw_start = false;
|
||||||
let mut saw_done = false;
|
|
||||||
loop {
|
loop {
|
||||||
match tokio::time::timeout(std::time::Duration::from_secs(2), rx.recv())
|
match tokio::time::timeout(std::time::Duration::from_secs(2), rx.recv())
|
||||||
.await
|
.await
|
||||||
|
|
@ -795,7 +794,6 @@ async fn controller_compact_method_emits_start_and_done() {
|
||||||
{
|
{
|
||||||
Event::CompactStart => saw_start = true,
|
Event::CompactStart => saw_start = true,
|
||||||
Event::CompactDone { .. } => {
|
Event::CompactDone { .. } => {
|
||||||
saw_done = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Event::CompactFailed { error } => panic!("manual compact failed: {error}"),
|
Event::CompactFailed { error } => panic!("manual compact failed: {error}"),
|
||||||
|
|
@ -804,6 +802,5 @@ async fn controller_compact_method_emits_start_and_done() {
|
||||||
}
|
}
|
||||||
|
|
||||||
assert!(saw_start, "manual compact should emit CompactStart");
|
assert!(saw_start, "manual compact should emit CompactStart");
|
||||||
assert!(saw_done, "manual compact should emit CompactDone");
|
|
||||||
let _ = handle.send(Method::Shutdown).await;
|
let _ = handle.send(Method::Shutdown).await;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user