chore: fix 0.0 match for OTP 26

This commit is contained in:
Zaiming (Stone) Shi 2023-11-29 10:50:15 +01:00
parent 14644988e0
commit 1a563b4f65
1 changed files with 10 additions and 10 deletions

View File

@ -53,9 +53,9 @@ t_get_metrics(_) ->
?assertMatch( ?assertMatch(
#{ #{
rate := #{ rate := #{
a := #{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}, b := #{current := +0.0, max := +0.0, last5m := +0.0},
c := #{current := 0.0, max := 0.0, last5m := 0.0} c := #{current := +0.0, max := +0.0, last5m := +0.0}
}, },
gauges := #{}, gauges := #{},
counters := #{ counters := #{
@ -118,9 +118,9 @@ t_clear_metrics(_Config) ->
?assertMatch( ?assertMatch(
#{ #{
rate := #{ rate := #{
a := #{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}, b := #{current := +0.0, max := +0.0, last5m := +0.0},
c := #{current := 0.0, max := 0.0, last5m := 0.0} c := #{current := +0.0, max := +0.0, last5m := +0.0}
}, },
gauges := #{}, gauges := #{},
slides := #{}, slides := #{},
@ -145,7 +145,7 @@ t_clear_metrics(_Config) ->
#{ #{
counters => #{}, counters => #{},
gauges => #{}, gauges => #{},
rate => #{current => 0.0, last5m => 0.0, max => 0.0}, rate => #{current => +0.0, last5m => +0.0, max => +0.0},
slides => #{} slides => #{}
}, },
emqx_metrics_worker:get_metrics(?NAME, Id) emqx_metrics_worker:get_metrics(?NAME, Id)
@ -160,9 +160,9 @@ t_reset_metrics(_) ->
?assertMatch( ?assertMatch(
#{ #{
rate := #{ rate := #{
a := #{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}, b := #{current := +0.0, max := +0.0, last5m := +0.0},
c := #{current := 0.0, max := 0.0, last5m := 0.0} c := #{current := +0.0, max := +0.0, last5m := +0.0}
}, },
gauges := #{}, gauges := #{},
counters := #{ counters := #{