test(buffer_worker): add assertion for inflight count after batch expiration
Fixes https://emqx.atlassian.net/browse/EMQX-9829
This commit is contained in:
parent
8d6652f162
commit
db60dcbada
|
@ -1256,6 +1256,13 @@ handle_async_batch_reply2([Inflight], ReplyContext, Result, Now) ->
|
|||
%% some queries are not expired, put them back to the inflight batch
|
||||
%% so it can be either acked now or retried later
|
||||
ok = update_inflight_item(InflightTID, Ref, RealNotExpired, NumExpired),
|
||||
?tp_ignore_side_effects_in_prod(
|
||||
handle_async_reply_partially_expired,
|
||||
#{
|
||||
inflight_count => inflight_count(InflightTID),
|
||||
num_inflight_messages => inflight_num_msgs(InflightTID)
|
||||
}
|
||||
),
|
||||
do_handle_async_batch_reply(ReplyContext#{min_batch := RealNotExpired}, Result)
|
||||
end.
|
||||
|
||||
|
|
|
@ -2248,6 +2248,15 @@ do_t_expiration_async_after_reply(IsBatch) ->
|
|||
}
|
||||
],
|
||||
?of_kind(handle_async_reply_expired, Trace)
|
||||
),
|
||||
?assertMatch(
|
||||
[
|
||||
#{
|
||||
inflight_count := 1,
|
||||
num_inflight_messages := 1
|
||||
}
|
||||
],
|
||||
?of_kind(handle_async_reply_partially_expired, Trace)
|
||||
);
|
||||
single ->
|
||||
?assertMatch(
|
||||
|
|
Loading…
Reference in New Issue