test(ingester): Add timeout panic to blocked `IngestState` WAL replay test

pull/24376/head
Fraser Savage 2023-09-19 11:58:52 +01:00
parent 9e80e03069
commit f6d6dd9b5b
No known key found for this signature in database
GPG Key ID: DE47C33CE8C5C446
1 changed files with 8 additions and 3 deletions

View File

@ -961,9 +961,14 @@ mod tests {
// Unblock the ingest state and assert file replay proceeds to complete
// with the sink having received the expected number of calls
assert!(ingest_state.unset(IngestStateError::PersistSaturated));
assert_matches!(replay_task.await.expect("replay task failed to join"), Ok(Some(id)) => {
assert_eq!(id, SequenceNumber::new(2));
});
assert_matches!(replay_task
.with_timeout_panic(Duration::from_secs(2))
.await
.expect("replay task failed to join"),
Ok(Some(id)) => {
assert_eq!(id, SequenceNumber::new(2));
}
);
assert_eq!(mock_sink.get_calls().len(), 2);
}