Skip to content

Commit

Permalink
A few more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
armenzg committed Sep 25, 2024
1 parent f61234b commit 7068136
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tests/snuba/test_deletes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SnubaTest(TestCase, SnubaTestCase):
def test_basic(self) -> None:
# insert a new issue
now = datetime.now()
id = uuid4()
occurrence_id = uuid4()
issue = (
2,
"insert",
Expand Down Expand Up @@ -55,20 +55,22 @@ def test_basic(self) -> None:
app_id="my_app",
query=DeleteQuery(
StorageKey.SearchIssues.value,
{"project_id": [self.project.id], "occurrence_id": [str(id)]},
{"project_id": [self.project.id], "occurrence_id": [str(occurrence_id)]},
),
tenant_ids={"referrer": "testing.test", "organization_id": 1},
)
snuba.raw_snql_query(req, use_cache=False)
assert (
snuba.query(
dataset=Dataset.IssuePlatform,
start=now - timedelta(days=1),
end=now + timedelta(days=1),
groupby=["project_id"],
filter_keys={"project_id": [self.project.id]},
referrer="testing.test",
tenant_ids={"referrer": "testing.test", "organization_id": 1},
)
== {}
time.sleep(4)

# check that it's gone
response = snuba.query(
dataset=Dataset.IssuePlatform,
start=now - timedelta(days=1),
end=now + timedelta(days=1),
groupby=["project_id"],
filter_keys={"project_id": [self.project.id]},
referrer="testing.test",
tenant_ids={"referrer": "testing.test", "organization_id": 1},
use_cache=False,
)
assert response == {}

0 comments on commit 7068136

Please sign in to comment.