mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-21 01:05:31 +00:00
ci: try to reduce flakiness for the lapin integration tests
This seems to flake out reasonably regularly in CI on PRs. Let's see if adjusting the ordering of things a little bit encourages a less flakey result.
This commit is contained in:
@@ -61,9 +61,6 @@ async fn test_lapin_rabbit() -> anyhow::Result<()> {
|
||||
.wait_for_maildir_count(1, Duration::from_secs(10))
|
||||
.await;
|
||||
|
||||
daemon.stop_both().await.context("stop_both")?;
|
||||
println!("Stopped!");
|
||||
|
||||
let mut consumer = channel
|
||||
.basic_consume(
|
||||
"woot",
|
||||
@@ -76,21 +73,24 @@ async fn test_lapin_rabbit() -> anyhow::Result<()> {
|
||||
let timeout = tokio::time::Duration::from_secs(20);
|
||||
|
||||
// Wait for Reception record
|
||||
let delivery = tokio::time::timeout(timeout, consumer.next())
|
||||
let reception = tokio::time::timeout(timeout, consumer.next())
|
||||
.await?
|
||||
.unwrap();
|
||||
let delivery = delivery?;
|
||||
println!("{}", String::from_utf8_lossy(&delivery.data));
|
||||
delivery.ack(BasicAckOptions::default()).await?;
|
||||
let reception = reception?;
|
||||
println!("reception={}", String::from_utf8_lossy(&reception.data));
|
||||
reception.ack(BasicAckOptions::default()).await?;
|
||||
|
||||
// Wait for Delivery record
|
||||
let delivery = tokio::time::timeout(timeout, consumer.next())
|
||||
.await?
|
||||
.unwrap();
|
||||
let delivery = delivery?;
|
||||
println!("{}", String::from_utf8_lossy(&delivery.data));
|
||||
println!("delivery={}", String::from_utf8_lossy(&delivery.data));
|
||||
delivery.ack(BasicAckOptions::default()).await?;
|
||||
|
||||
daemon.stop_both().await.context("stop_both")?;
|
||||
println!("Stopped!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user