From 7cf518986ace6d4d68b19fe7e0dd0b0f6b73b084 Mon Sep 17 00:00:00 2001 From: Riccardo Busetti Date: Sat, 7 Sep 2024 09:56:34 +0200 Subject: [PATCH] Fix test --- relay-server/src/services/buffer/envelope_stack/sqlite.rs | 1 + relay-server/src/services/buffer/mod.rs | 1 + relay-server/src/services/processor/event.rs | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/relay-server/src/services/buffer/envelope_stack/sqlite.rs b/relay-server/src/services/buffer/envelope_stack/sqlite.rs index f3fed5efcf..cb4d1f3c04 100644 --- a/relay-server/src/services/buffer/envelope_stack/sqlite.rs +++ b/relay-server/src/services/buffer/envelope_stack/sqlite.rs @@ -468,6 +468,7 @@ mod tests { 1, ProjectKey::parse("a94ae32be2584e0bbd7a4cbb95971fee").unwrap(), ProjectKey::parse("b81ae32be2584e0bbd7a4cbb95971fe1").unwrap(), + true, ); let envelopes = mock_envelopes(5); diff --git a/relay-server/src/services/buffer/mod.rs b/relay-server/src/services/buffer/mod.rs index d46dfd1f89..3aea3daaef 100644 --- a/relay-server/src/services/buffer/mod.rs +++ b/relay-server/src/services/buffer/mod.rs @@ -208,6 +208,7 @@ impl EnvelopeBufferService { } async fn handle_shutdown(&mut self, buffer: PolymorphicEnvelopeBuffer, message: Shutdown) { + // We gracefully shut down only if the shutdown has a timeout. if let Some(shutdown_timeout) = message.timeout { let shutdown_result = timeout(shutdown_timeout, async { buffer.shutdown().await; diff --git a/relay-server/src/services/processor/event.rs b/relay-server/src/services/processor/event.rs index eee0c3ff79..54fec8d519 100644 --- a/relay-server/src/services/processor/event.rs +++ b/relay-server/src/services/processor/event.rs @@ -872,8 +872,7 @@ mod tests { let event = Annotated::new(Event { release: Annotated::new( - String::from("���7��#1G����7��#1G����7��#1G����7��#1G����7��#") - .into(), + String::from("���7��#1G����7��#1G����7��#1G����7��#1G����7��#").into(), ), ..Default::default() });