From 48ced123c37fe92f693848429b84ab10da50ca6a Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Fri, 14 Jan 2022 12:54:11 +0100 Subject: [PATCH] test: increate timeouts --- tests/producer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/producer.rs b/tests/producer.rs index 0ded065a..0faed9de 100644 --- a/tests/producer.rs +++ b/tests/producer.rs @@ -24,7 +24,7 @@ async fn test_batch_producer() { let partition_client = Arc::new(client.partition_client(&topic, 0).await.unwrap()); let producer = BatchProducerBuilder::new(partition_client) - .with_linger(Duration::from_secs(2)) + .with_linger(Duration::from_secs(5)) .build(RecordAggregator::new(record.approximate_size() * 2 + 1)); let a = producer.produce(record.clone()).fuse(); @@ -48,7 +48,7 @@ async fn test_batch_producer() { r = a => r.unwrap(), r = b => r.unwrap(), _ = c => panic!("c finished!"), - _ = tokio::time::sleep(Duration::from_millis(1_000)).fuse() => break + _ = tokio::time::sleep(Duration::from_millis(4_000)).fuse() => break }; } @@ -56,7 +56,7 @@ async fn test_batch_producer() { assert!(b.is_terminated()); // Third record should eventually be published - tokio::time::timeout(Duration::from_secs(5), c) + tokio::time::timeout(Duration::from_secs(6), c) .await .expect("no timeout") .unwrap();