Skip to content

Commit

Permalink
fix(CI): Make timestamp relative for metrics summaries test (#5904)
Browse files Browse the repository at this point in the history
* make timestamp relative

* fix

* seconds not minutes
  • Loading branch information
ayirr7 authored May 14, 2024
1 parent 83f3d5a commit 02c225b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/datasets/processors/test_metrics_summaries_processor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timedelta
from typing import Any, Mapping, Sequence

import pytest
Expand All @@ -17,18 +17,24 @@


def build_metrics_summary_payload() -> MetricsSummary:

received_timestamp = datetime.timestamp(
datetime.now() - timedelta(days=1) - timedelta(seconds=5)
)
end_timestamp = datetime.timestamp(datetime.now() - timedelta(days=1))

return MetricsSummary(
{
"count": 1,
"duration_ms": 1000,
"end_timestamp": 1707862430.123,
"end_timestamp": end_timestamp,
"group": "deadbeefdeadbeef",
"is_segment": False,
"max": 1.0,
"min": 1.0,
"mri": "t:namespace/name@unit",
"project_id": 42,
"received": 1707862428.123,
"received": received_timestamp,
"retention_days": 90,
"segment_id": "deadbeefdeadbeef",
"span_id": "deadbeefdeadbeef",
Expand Down

0 comments on commit 02c225b

Please sign in to comment.