This is an automated email from the ASF dual-hosted git repository.
konstantinov pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new b21b12a6 client_request_metrics_test fix, relax validation for default
Mean metric values: it can be NaN or 0
b21b12a6 is described below
commit b21b12a68e417918103f258b1f523fc145f62b6f
Author: Dmitry Konstantinov <[email protected]>
AuthorDate: Thu Nov 20 16:11:48 2025 +0000
client_request_metrics_test fix, relax validation for default Mean metric
values: it can be NaN or 0
Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith for
CASSANDRA-21032
---
client_request_metrics_test.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/client_request_metrics_test.py b/client_request_metrics_test.py
index 7286ccbc..4d1261c6 100644
--- a/client_request_metrics_test.py
+++ b/client_request_metrics_test.py
@@ -623,7 +623,7 @@ def validate_sane_histogram_values(prefix, values,
cassandra_version):
def validate_zero_histogram_values(prefix, values):
validators = defaultdict(lambda: is_zero)
validators['RecentValues'] = is_zero_list
- validators['Mean'] = is_none
+ validators['Mean'] = is_none_or_zero
validators['DurationUnit'] = is_microseconds
for k, v in values.items():
validators[k](f"{prefix}{k}", v)
@@ -763,8 +763,8 @@ def is_non_negative(k, v):
assert v >= 0, k
-def is_none(k, v):
- assert v is None, k
+def is_none_or_zero(k, v):
+ assert v is None or v == 0 , k
def is_microseconds(k, v):
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]