Skip to content

Commit 7b68449

Browse files
committed
kill test if too many datapoints received
1 parent fc4fe8e commit 7b68449

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/integ/agent/test_end_to_end.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ def metric_exists(metric_name, expected_samples=1):
101101

102102
if total_samples == expected_samples:
103103
return True
104+
elif total_samples > expected_samples:
105+
raise Exception(
106+
f"Too many datapoints returned. Expected #{expected_samples}, received #{total_samples}"
107+
)
104108
else:
105109
print(response["Datapoints"])
110+
print(f"Expected #{expected_samples}, received #{total_samples}.")
106111

107112
return False

0 commit comments

Comments
 (0)