From 1a563b4f652c6923669a775091331f79272c68eb Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Wed, 29 Nov 2023 10:50:15 +0100 Subject: [PATCH] chore: fix 0.0 match for OTP 26 --- apps/emqx/test/emqx_metrics_worker_SUITE.erl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/emqx/test/emqx_metrics_worker_SUITE.erl b/apps/emqx/test/emqx_metrics_worker_SUITE.erl index 194c9cc99..784eac18e 100644 --- a/apps/emqx/test/emqx_metrics_worker_SUITE.erl +++ b/apps/emqx/test/emqx_metrics_worker_SUITE.erl @@ -53,9 +53,9 @@ t_get_metrics(_) -> ?assertMatch( #{ rate := #{ - a := #{current := 0.0, max := 0.0, last5m := 0.0}, - b := #{current := 0.0, max := 0.0, last5m := 0.0}, - c := #{current := 0.0, max := 0.0, last5m := 0.0} + a := #{current := +0.0, max := +0.0, last5m := +0.0}, + b := #{current := +0.0, max := +0.0, last5m := +0.0}, + c := #{current := +0.0, max := +0.0, last5m := +0.0} }, gauges := #{}, counters := #{ @@ -118,9 +118,9 @@ t_clear_metrics(_Config) -> ?assertMatch( #{ rate := #{ - a := #{current := 0.0, max := 0.0, last5m := 0.0}, - b := #{current := 0.0, max := 0.0, last5m := 0.0}, - c := #{current := 0.0, max := 0.0, last5m := 0.0} + a := #{current := +0.0, max := +0.0, last5m := +0.0}, + b := #{current := +0.0, max := +0.0, last5m := +0.0}, + c := #{current := +0.0, max := +0.0, last5m := +0.0} }, gauges := #{}, slides := #{}, @@ -145,7 +145,7 @@ t_clear_metrics(_Config) -> #{ counters => #{}, gauges => #{}, - rate => #{current => 0.0, last5m => 0.0, max => 0.0}, + rate => #{current => +0.0, last5m => +0.0, max => +0.0}, slides => #{} }, emqx_metrics_worker:get_metrics(?NAME, Id) @@ -160,9 +160,9 @@ t_reset_metrics(_) -> ?assertMatch( #{ rate := #{ - a := #{current := 0.0, max := 0.0, last5m := 0.0}, - b := #{current := 0.0, max := 0.0, last5m := 0.0}, - c := #{current := 0.0, max := 0.0, last5m := 0.0} + a := #{current := +0.0, max := +0.0, last5m := +0.0}, + b := #{current := +0.0, max := +0.0, last5m := +0.0}, + c := #{current := +0.0, max := +0.0, last5m := +0.0} }, gauges := #{}, counters := #{