From 855bfeb689517f217614d2d3b78ee0b370e7e7cf Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Wed, 8 Nov 2023 11:50:20 +0100 Subject: [PATCH 1/2] Increase SQS timeout in galley integration It seems 3 seconds is not enough sometimes, and it was causing flakiness of legalhold tests in CI. --- libs/types-common-aws/src/Util/Test/SQS.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/types-common-aws/src/Util/Test/SQS.hs b/libs/types-common-aws/src/Util/Test/SQS.hs index 2e62c4e343..c94188c2ae 100644 --- a/libs/types-common-aws/src/Util/Test/SQS.hs +++ b/libs/types-common-aws/src/Util/Test/SQS.hs @@ -90,12 +90,12 @@ waitForMessage watcher seconds predicate = timeout (seconds * 1_000_000) poll (x : _) -> (delete x events, Just x) maybe (threadDelay 10000 >> poll) pure matched --- | First waits for a message matching a given predicate for 3 seconds (this +-- | First waits for a message matching a given predicate for 10 seconds (this -- number could be chosen more scientifically) and then uses a callback to make -- an assertion on such a message. assertMessage :: (MonadUnliftIO m, Eq a, HasCallStack) => SQSWatcher a -> String -> (a -> Bool) -> (String -> Maybe a -> m ()) -> m () assertMessage watcher label predicate callback = do - matched <- waitForMessage watcher 3 predicate + matched <- waitForMessage watcher 10 predicate callback label matched ----------------------------------------------------------------------------- From 9b3a3ba87abd6545ffd6b728e53726e7656367f4 Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Wed, 8 Nov 2023 14:21:41 +0100 Subject: [PATCH 2/2] Add CHANGELOG entry --- changelog.d/5-internal/increase-sqs-timeout | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5-internal/increase-sqs-timeout diff --git a/changelog.d/5-internal/increase-sqs-timeout b/changelog.d/5-internal/increase-sqs-timeout new file mode 100644 index 0000000000..59d6d0f419 --- /dev/null +++ b/changelog.d/5-internal/increase-sqs-timeout @@ -0,0 +1 @@ +Increase timeout for waiting for SQS notifications in galley's integration tests