Commit be87cf8
authored
ref: fix flaky digests test (#81256)
relay [rounds
timestamps](https://github.com/getsentry/relay/blob/0459abec0ee79f773d163f35e742cebd34134793/relay-event-schema/src/protocol/types.rs#L896)
whereas the test truncates
I first forced the test to fail with:
```diff
diff --git a/tests/sentry/notifications/notifications/test_digests.py b/tests/sentry/notifications/notifications/test_digests.py
index be02406..2943b1875e 100644
--- a/tests/sentry/notifications/notifications/test_digests.py
+++ b/tests/sentry/notifications/notifications/test_digests.py
@@ -163,7 +163,10 @@ class DigestSlackNotification(SlackActivityNotificationTest):
backend = RedisBackend()
digests.backend.digest = backend.digest
digests.enabled.return_value = True
- timestamp_raw = before_now(days=1)
+ while True:
+ timestamp_raw = before_now(days=1)
+ if int(timestamp_raw.timestamp()) != round(timestamp_raw.timestamp()):
+ break
timestamp_secs = int(timestamp_raw.timestamp())
timestamp = timestamp_raw.isoformat()
key = f"slack:p:{self.project.id}:IssueOwners::AllMembers"
```
<!-- Describe your PR here. -->1 parent 52f5b44 commit be87cf8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments