From 52464d4775f97fb78a85938698219005ec426746 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 28 Mar 2024 14:25:31 -0700 Subject: [PATCH] Fix semver hazard in S3 stalled stream protection test --- .../s3/tests/stalled-stream-protection.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs b/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs index 25008a415e..af38678f70 100644 --- a/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs +++ b/aws/sdk/integration-tests/s3/tests/stalled-stream-protection.rs @@ -229,8 +229,14 @@ async fn test_stalled_stream_protection_for_downloads_is_enabled_by_default() { err.to_string(), "minimum throughput was specified at 1 B/s, but throughput of 0 B/s was observed" ); - // 1s check interval + 5s grace period - assert_eq!(start.elapsed().as_secs(), 6); + // 5s grace period + // TODO(https://github.com/smithy-lang/smithy-rs/issues/3510): Currently comparing against 5 and 6 due to + // the behavior change in #3485. Once that feature/fix is released, this should be changed to only check for 5. + let elapsed_secs = start.elapsed().as_secs(); + assert!( + elapsed_secs == 5 || elapsed_secs == 6, + "elapsed secs should be 5 or 6, but was {elapsed_secs}" + ) } async fn start_faulty_download_server() -> (impl Future, SocketAddr) {