Skip to content

Commit 2acce28

Browse files
fix(eap): Fix flakey timestamp assertion (#4734)
1 parent 7f03054 commit 2acce28

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/integration/test_ourlogs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def test_ourlog_extraction_with_otel_logs(
122122
"sentry.trace_flags": AnyValue(int_value=0),
123123
"string.attribute": AnyValue(string_value="some string"),
124124
},
125-
received=timestamp_proto,
126125
retention_days=90,
127126
client_sample_rate=1.0,
128127
server_sample_rate=1.0,
@@ -136,6 +135,7 @@ def test_ourlog_extraction_with_otel_logs(
136135
# we can't generate uuid7 with a specific timestamp
137136
# in Python just yet so we're overriding it
138137
expected_log["itemId"] = log["itemId"]
138+
expected_log["received"] = time_within_delta()
139139

140140
# This field is set by Relay so we need to remove it
141141
del log["attributes"]["sentry.observed_timestamp_nanos"]
@@ -295,7 +295,6 @@ def test_ourlog_extraction_with_sentry_logs(
295295
string_value=str(timestamp_nanos)
296296
),
297297
},
298-
received=timestamp_proto,
299298
retention_days=90,
300299
client_sample_rate=1.0,
301300
server_sample_rate=1.0,
@@ -331,7 +330,6 @@ def test_ourlog_extraction_with_sentry_logs(
331330
string_value=str(timestamp_nanos)
332331
),
333332
},
334-
received=timestamp_proto,
335333
retention_days=90,
336334
client_sample_rate=1.0,
337335
server_sample_rate=1.0,
@@ -345,6 +343,7 @@ def test_ourlog_extraction_with_sentry_logs(
345343
# we can't generate uuid7 with a specific timestamp
346344
# in Python just yet so we're overriding it
347345
expected_log["itemId"] = log["itemId"]
346+
expected_log["received"] = time_within_delta()
348347

349348
assert logs == expected_logs
350349

@@ -407,7 +406,6 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields(
407406
"sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos),
408407
"sentry.trace_flags": AnyValue(int_value=0),
409408
},
410-
received=timestamp_proto,
411409
retention_days=90,
412410
client_sample_rate=1.0,
413411
server_sample_rate=1.0,
@@ -421,6 +419,7 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields(
421419
# we can't generate uuid7 with a specific timestamp
422420
# in Python just yet so we're overriding it
423421
expected_log["itemId"] = log["itemId"]
422+
expected_log["received"] = time_within_delta()
424423

425424
assert logs == expected_logs
426425

0 commit comments

Comments
 (0)