Browse Source

test(events-v2): Fix flaky tests (#13698)

Lyn Nagara 5 years ago
parent
commit
f365c0b8f3

+ 1 - 1
tests/snuba/api/endpoints/test_organization_event_details.py

@@ -42,7 +42,7 @@ class OrganizationEventDetailsTestBase(APITestCase, SnubaTestCase):
             },
             project_id=self.project.id,
         )
-        self.groups = Group.objects.all()
+        self.groups = list(Group.objects.all().order_by('id'))
 
 
 class OrganizationEventDetailsEndpointTest(OrganizationEventDetailsTestBase):

+ 2 - 2
tests/snuba/api/endpoints/test_organization_events_v2.py

@@ -278,7 +278,7 @@ class OrganizationEventsV2EndpointTest(OrganizationEventsTestBase):
             project_id=project.id,
         )
 
-        groups = Group.objects.all()
+        groups = list(Group.objects.all().order_by('id'))
 
         with self.feature('organizations:events-v2'):
             response = self.client.get(
@@ -439,7 +439,7 @@ class OrganizationEventsV2EndpointTest(OrganizationEventsTestBase):
             project_id=project.id,
         )
 
-        groups = Group.objects.all()
+        groups = list(Group.objects.all().order_by('id'))
 
         with self.feature('organizations:events-v2'):
             response = self.client.get(