Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Veksler <Mihails.Vekslers@zabbix.com>2021-12-09 19:30:31 +0300
committerMichael Veksler <Mihails.Vekslers@zabbix.com>2021-12-09 19:30:31 +0300
commit05eb1ab8ab28cdd1d316cb5f32645ca820641bc2 (patch)
tree8f6228a93b69a3d3a62ae95ee3d9a82f91d997dc /tests
parent05a27a5555ffbb373ffdb514f63cb46c9d1a3ccc (diff)
parent9f4af3c05db1b1e50a5a4e9465c2dc2f8c72d12d (diff)
.......PS. [ZBX-20311] returned the value -1 for bucket_percentile() and histogram_quantile() if bucket[+inf] = 0
* commit '9f4af3c05db1b1e50a5a4e9465c2dc2f8c72d12d': .......PS. [ZBX-20311] added cmocka tests for -1 case .......PS. [ZBX-20311] returned the value -1 in case the rate[inf] = 0
Diffstat (limited to 'tests')
-rw-r--r--tests/libs/zbxeval/zbx_eval_execute.yaml11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/libs/zbxeval/zbx_eval_execute.yaml b/tests/libs/zbxeval/zbx_eval_execute.yaml
index d24a1779ef3..c1227f846aa 100644
--- a/tests/libs/zbxeval/zbx_eval_execute.yaml
+++ b/tests/libs/zbxeval/zbx_eval_execute.yaml
@@ -2206,7 +2206,16 @@ in:
rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
expression: 'histogram_quantile(0.8, 0.1, 1, 0.2, 2, "+Inf", 0)'
out:
- result: FAIL
+ result: SUCCEED
+ value: '0.16000000000000003'
+---
+test case: Expression 'histogram_quantile(0.8, 0.1, 0, 0.2, 0, +Inf, 0)'
+in:
+ rules: [ZBX_EVAL_PARSE_FUNCTION,ZBX_EVAL_PARSE_VAR]
+ expression: 'histogram_quantile(0.8, 0.1, 0, 0.2, 0, "+Inf", 0)'
+out:
+ result: SUCCEED
+ value: '-1'
---
test case: Expression 'histogram_quantile(-0.1, 0.2, 10, 0.4, 20, 1.0, 60, 1.2, 70, +Inf, 80)'
in: