[stats] Add a test for IncrementHttp2MetadataSize(0) (#32896)

This test proves that `global_stats.IncrementHttp2MetadataSize(0)` works

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
This commit is contained in:
Craig Tiller 2023-04-19 08:37:53 -07:00 committed by GitHub
parent df5af05ce7
commit 9128604b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,11 @@ TEST(StatsTest, IncSpecificCounter) {
EXPECT_EQ(snapshot->delta()->client_calls_created, 1);
}
TEST(StatsTest, IncrementHttp2MetadataSize) {
ExecCtx exec_ctx;
global_stats().IncrementHttp2MetadataSize(0);
}
static int FindExpectedBucket(const HistogramView& h, int value) {
if (value < 0) {
return 0;