Skip to content

Commit fc4fe8e

Browse files
committed
sum the total samples retrieved
1 parent 0991a29 commit fc4fe8e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/integ/agent/test_end_to_end.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ def metric_exists(metric_name, expected_samples=1):
9595
Unit="Milliseconds",
9696
)
9797

98-
if len(response["Datapoints"]) > 0:
99-
sample_count = response["Datapoints"][0]["SampleCount"]
100-
if sample_count == expected_samples:
101-
return True
102-
else:
103-
print(response["Datapoints"])
98+
total_samples = 0
99+
for datapoint in response["Datapoints"]:
100+
total_samples += datapoint["SampleCount"]
101+
102+
if total_samples == expected_samples:
103+
return True
104+
else:
105+
print(response["Datapoints"])
104106

105107
return False

0 commit comments

Comments
 (0)