Skip to content

Commit

Permalink
flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 29, 2024
1 parent e83f1d7 commit 0334f31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration_tests/charts/data/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import copy
from datetime import datetime
from io import BytesIO
import time
from typing import Any, Optional
from unittest import mock
from zipfile import ZipFile
Expand Down Expand Up @@ -718,6 +719,9 @@ def test_chart_data_async(self):
app._got_first_request = False
async_query_manager_factory.init_app(app)
self.login("admin")
# fighting a weird race condition only my mysql in the test matrix where we get
# a 200 instead of a 202
time.sleep(0.5)
rv = self.post_assert_metric(CHART_DATA_URI, self.query_context_payload, "data")
self.assertEqual(rv.status_code, 202)
data = json.loads(rv.data.decode("utf-8"))
Expand Down

0 comments on commit 0334f31

Please sign in to comment.