Skip to content

Commit 0908a1a

Browse files
committed
fix(tests): Fix flaky test_snuba_data timestamp precision mismatch
Strip microseconds from the test event timestamp since Snuba truncates timestamps to second precision. This caused intermittent assertion failures when comparing nodestore vs Snuba timestamp values. Fixes #109056
1 parent de508ab commit 0908a1a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tests/sentry/services/eventstore/test_models.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def test_snuba_data(self) -> None:
212212
"message": "Hello World!",
213213
"tags": {"logger": "foobar", "site": "foo", "server_name": "bar"},
214214
"user": {"id": "test", "email": "test@test.com"},
215-
"timestamp": before_now(seconds=1).isoformat(),
215+
"timestamp": before_now(seconds=1).replace(microsecond=0).isoformat(),
216216
},
217217
project_id=self.project.id,
218218
)

0 commit comments

Comments
 (0)