From 5574afc0959f9aa7665cf25eb11d01d48403cfea Mon Sep 17 00:00:00 2001 From: Fredrik Hernqvist Date: Tue, 17 Oct 2023 11:01:00 +0200 Subject: [PATCH] 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 Commit-Queue: Henrik Lundin Auto-Submit: Fredrik Hernqvist Cr-Commit-Position: refs/heads/main@{#40946} --- modules/audio_mixer/audio_mixer_impl_unittest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/audio_mixer/audio_mixer_impl_unittest.cc b/modules/audio_mixer/audio_mixer_impl_unittest.cc index 641c966570..2044cb9b90 100644 --- a/modules/audio_mixer/audio_mixer_impl_unittest.cc +++ b/modules/audio_mixer/audio_mixer_impl_unittest.cc @@ -142,6 +142,7 @@ void MixMonoAtGivenNativeRate(int native_sample_rate, } TEST(AudioMixer, UpdatesSourceCountHistogram) { + metrics::Reset(); constexpr int kAudioSourcesGroup1 = 5; constexpr int kAudioSourcesGroup2 = 3;