Fix AudioMixer histogram test

If the tests are run in a different order, the test might fail.
We fix this by resetting the histogram data at the start of the test.

Change-Id: I6fb349609842b55f416cf2ec8cd93d0b4328960e
Bug: chromium:1430806
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323801
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Fredrik Hernqvist <fhernqvist@google.com>
Cr-Commit-Position: refs/heads/main@{#40946}
This commit is contained in:
Fredrik Hernqvist 2023-10-17 11:01:00 +02:00 committed by WebRTC LUCI CQ
parent be511490b7
commit 5574afc095

View file

@ -142,6 +142,7 @@ void MixMonoAtGivenNativeRate(int native_sample_rate,
}
TEST(AudioMixer, UpdatesSourceCountHistogram) {
metrics::Reset();
constexpr int kAudioSourcesGroup1 = 5;
constexpr int kAudioSourcesGroup2 = 3;