test: make sure gauge return to 0 in test cases

This commit is contained in:
Zaiming (Stone) Shi 2023-02-22 23:07:12 +01:00
parent 2811c371ad
commit bf8becd521
1 changed files with 14 additions and 0 deletions

View File

@ -2102,6 +2102,10 @@ t_expiration_batch_all_expired_after_reply(_Config) ->
late_reply := 1,
retried := 0,
failed := 0
},
gauges := #{
inflight := 0,
queuing := 0
}
},
Metrics
@ -2217,6 +2221,16 @@ do_t_expiration_retry(IsBatch) ->
[#{expired := [{query, _, {inc_counter, 1}, _, _}]}],
?of_kind(buffer_worker_retry_expired, Trace)
),
Metrics = tap_metrics(?LINE),
?assertMatch(
#{
gauges := #{
inflight := 0,
queuing := 0
}
},
Metrics
),
ok
end
),