Skip to content

Commit

Permalink
fix(replay): delete flaky test test_get_replays_dead_rage_click_cutoff (
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 committed Mar 6, 2024
1 parent 8823af4 commit 99e584e
Showing 1 changed file with 0 additions and 78 deletions.
78 changes: 0 additions & 78 deletions tests/sentry/replays/test_organization_replay_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import uuid
from unittest import mock

import pytest
from django.urls import reverse

from sentry.replays.testutils import (
Expand Down Expand Up @@ -1350,83 +1349,6 @@ def test_get_replays_memory_error(self):
== b'{"detail":"Query limits exceeded. Try narrowing your request."}'
)

@pytest.mark.skip(reason="flaky: Date logic breaks - possibly due to stats-period.")
def test_get_replays_dead_rage_click_cutoff(self):
"""Test rage and dead clicks are accumulated after the cutoff."""
project = self.create_project(teams=[self.team])

replay1_id = uuid.uuid4().hex
pre_cutoff = datetime.datetime(year=2023, month=7, day=23)
post_cutoff = datetime.datetime(year=2023, month=7, day=24)

self.store_replays(
mock_replay(
pre_cutoff,
project.id,
replay1_id,
)
)
self.store_replays(
mock_replay(
post_cutoff,
project.id,
replay1_id,
)
)
self.store_replays(
mock_replay_click(
pre_cutoff,
project.id,
replay1_id,
node_id=1,
tag="div",
id="myid",
class_=["class1", "class2"],
role="button",
testid="1",
alt="Alt",
aria_label="AriaLabel",
title="MyTitle",
is_dead=1,
is_rage=1,
text="Hello",
)
)
self.store_replays(
mock_replay_click(
post_cutoff,
project.id,
replay1_id,
node_id=1,
tag="div",
id="myid",
class_=["class1", "class2"],
role="button",
testid="1",
alt="Alt",
aria_label="AriaLabel",
title="MyTitle",
is_dead=1,
is_rage=1,
text="Hello",
)
)

with self.feature(REPLAYS_FEATURES):
response = self.client.get(
self.url
+ f"?start={pre_cutoff.isoformat().split('.')[0]}&end={post_cutoff.isoformat().split('.')[0]}"
)
assert response.status_code == 200

response_data = response.json()
assert "data" in response_data
assert len(response_data["data"]) == 1

item = response_data["data"][0]
assert item["count_dead_clicks"] == 1, item["count_dead_clicks"]
assert item["count_rage_clicks"] == 1, item["count_rage_clicks"]

def test_get_replays_filter_clicks_non_click_rows(self):
project = self.create_project(teams=[self.team])

Expand Down

0 comments on commit 99e584e

Please sign in to comment.