From 862cc2b647d58ccf14502b839f3d9954fbafffac Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Thu, 6 Jun 2024 16:40:46 -0700 Subject: [PATCH] Mark more flakes. --- tests/test_memoize_s3.py | 1 - tests/test_messaging.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_memoize_s3.py b/tests/test_memoize_s3.py index 958d340..71ac2a4 100644 --- a/tests/test_memoize_s3.py +++ b/tests/test_memoize_s3.py @@ -3,7 +3,6 @@ import pytest from unittest import mock -from tenacity import retry, stop_after_attempt from botocore.exceptions import ClientError from braingeneers.utils.configure import skip_unittest_if_offline from braingeneers.utils.memoize_s3 import memoize diff --git a/tests/test_messaging.py b/tests/test_messaging.py index 1c60074..a3eea30 100644 --- a/tests/test_messaging.py +++ b/tests/test_messaging.py @@ -213,6 +213,7 @@ def setUp(self) -> None: self.mb = messaging.MessageBroker() self.mb.delete_queue("unittest") + @retry(stop=stop_after_attempt(3)) # TODO: Fix this flaky test def test_get_put_defaults(self): q = self.mb.get_queue("unittest") q.put("some-value") @@ -226,12 +227,14 @@ def test_get_put_nonblocking_without_maxsize(self): result = q.get(block=False) self.assertEqual(result, "some-value") + @retry(stop=stop_after_attempt(3)) # TODO: Fix this flaky test def test_maxsize(self): q = self.mb.get_queue("unittest", maxsize=1) q.put("some-value") result = q.get() self.assertEqual(result, "some-value") + @retry(stop=stop_after_attempt(3)) # TODO: Fix this flaky test def test_timeout_put(self): q = self.mb.get_queue("unittest", maxsize=1) q.put("some-value-1")