From b26b99361a7eac9fd217c0b23eb5c29df82ffe01 Mon Sep 17 00:00:00 2001 From: Kyle Mumma Date: Fri, 24 Jan 2025 15:41:35 -0800 Subject: [PATCH] update breaking test --- ...endpoint_trace_item_table_extrapolation.py | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_extrapolation.py b/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_extrapolation.py index bb21b6048de..7129f2b7818 100644 --- a/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_extrapolation.py +++ b/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_extrapolation.py @@ -1,4 +1,3 @@ -import math import random import uuid from datetime import datetime, timedelta @@ -553,42 +552,36 @@ def test_count_reliability_with_group_by_backward_compat(self) -> None: response = EndpointTraceItemTable().execute(message) measurement_tags = [v.val_str for v in response.column_values[0].results] - assert measurement_tags == ["foo", "bar"] + assert measurement_tags == ["foo"] measurement_sums = [v.val_double for v in response.column_values[1].results] measurement_reliabilities = [v for v in response.column_values[1].reliabilities] - assert measurement_sums == [sum(range(5)), 0] + assert measurement_sums == [sum(range(5))] assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count measurement_avgs = [v.val_double for v in response.column_values[2].results] measurement_reliabilities = [v for v in response.column_values[2].reliabilities] - assert len(measurement_avgs) == 2 + assert len(measurement_avgs) == 1 assert measurement_avgs[0] == sum(range(5)) / 5 - assert math.isnan(measurement_avgs[1]) assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count measurement_counts = [v.val_double for v in response.column_values[3].results] measurement_reliabilities = [v for v in response.column_values[3].reliabilities] - assert measurement_counts == [5, 0] + assert measurement_counts == [5] assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count measurement_p90s = [v.val_double for v in response.column_values[4].results] measurement_reliabilities = [v for v in response.column_values[4].reliabilities] - assert len(measurement_p90s) == 2 + assert len(measurement_p90s) == 1 assert measurement_p90s[0] == 4 - assert math.isnan(measurement_p90s[1]) assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count def test_count_reliability_with_group_by(self) -> None: @@ -684,40 +677,34 @@ def test_count_reliability_with_group_by(self) -> None: response = EndpointTraceItemTable().execute(message) measurement_tags = [v.val_str for v in response.column_values[0].results] - assert measurement_tags == ["foo", "bar"] + assert measurement_tags == ["foo"] measurement_sums = [v.val_double for v in response.column_values[1].results] measurement_reliabilities = [v for v in response.column_values[1].reliabilities] - assert measurement_sums == [sum(range(5)), 0] + assert measurement_sums == [sum(range(5))] assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count measurement_avgs = [v.val_double for v in response.column_values[2].results] measurement_reliabilities = [v for v in response.column_values[2].reliabilities] - assert len(measurement_avgs) == 2 + assert len(measurement_avgs) == 1 assert measurement_avgs[0] == sum(range(5)) / 5 - assert math.isnan(measurement_avgs[1]) assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count measurement_counts = [v.val_double for v in response.column_values[3].results] measurement_reliabilities = [v for v in response.column_values[3].reliabilities] - assert measurement_counts == [5, 0] + assert measurement_counts == [5] assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count measurement_p90s = [v.val_double for v in response.column_values[4].results] measurement_reliabilities = [v for v in response.column_values[4].reliabilities] - assert len(measurement_p90s) == 2 + assert len(measurement_p90s) == 1 assert measurement_p90s[0] == 4 - assert math.isnan(measurement_p90s[1]) assert measurement_reliabilities == [ Reliability.RELIABILITY_LOW, - Reliability.RELIABILITY_UNSPECIFIED, ] # low reliability due to low sample count