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 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 -----------------------------------------------------------------------------