Browse Source

test: Mark or fix flakey tests

Matt Gaunt-Seo 1 year ago
parent
commit
334d08567f

+ 2 - 2
tests/sentry/api/endpoints/test_organization_dashboard_details.py

@@ -203,8 +203,8 @@ class OrganizationDashboardDetailsGetTest(OrganizationDashboardDetailsTestCase):
             response = self.do_request("get", self.url(dashboard.id))
 
         assert response.data["expired"]
-        assert iso_format(response.data["start"].replace(second=0)) == iso_format(
-            expected_adjusted_retention_start.replace(second=0)
+        assert iso_format(response.data["start"].replace(second=0, minute=0)) == iso_format(
+            expected_adjusted_retention_start.replace(second=0, minute=0)
         )
 
 

+ 4 - 0
tests/sentry/api/endpoints/test_project_artifact_lookup.py

@@ -3,6 +3,7 @@ from datetime import datetime, timezone
 from io import BytesIO
 from uuid import uuid4
 
+import pytest
 from django.urls import reverse
 
 from sentry.models import ArtifactBundle, DebugIdArtifactBundle, File, ReleaseFile, SourceFileType
@@ -290,6 +291,9 @@ class ArtifactLookupTest(APITestCase):
         assert response[0]["headers"] == file_headers
         self.assert_download_matches_file(response[0]["url"], file)
 
+    @pytest.mark.skip(
+        reason="flakey: https://sentry.sentry.io/issues/4024152695/?cursor=0%3A200%3A0&project=2423079"
+    )
     def test_query_by_url_from_artifact_index(self):
         self.login_as(user=self.user)
 

+ 1 - 1
tests/sentry_plugins/amazon_sqs/test_plugin.py

@@ -9,6 +9,7 @@ from sentry.utils import json
 from sentry_plugins.amazon_sqs.plugin import AmazonSQSPlugin
 
 
+@pytest.mark.skip(reason="https://github.com/getsentry/sentry/issues/44858")
 class AmazonSQSPluginTest(PluginTestCase):
     @cached_property
     def plugin(self):
@@ -134,7 +135,6 @@ class AmazonSQSPluginTest(PluginTestCase):
 
     @patch("sentry_plugins.amazon_sqs.plugin.logger")
     @patch("boto3.client")
-    @pytest.mark.skip(reason="https://github.com/getsentry/sentry/issues/44858")
     def test_invalid_s3_bucket(self, mock_client, logger):
         self.plugin.set_option("s3_bucket", "bad_bucket", self.project)
         mock_client.return_value.put_object.side_effect = ClientError(