Commit e808baa3 authored by Max Morin's avatar Max Morin Committed by Commit Bot

Deflake RendererAudioOutputStreamFactoryIntegrationTest

I reproduced the flake locally and found that the RenderCallback
was busy generating sine values, causing an underrun.

This CL increases the buffer duration by 10
(also increasing the timeout by 5), and decreases the sample
frequency (so that fewer values have to be generated).

Since the test was quite slow, kBuffers is also reduced a bit.

With these changes, the test ran 1M times with asan without any
flakes.

Bug: 761214
Change-Id: I0855a63edbd62e4c4f9afe4d9d1f68c2b61ff61c
Reviewed-on: https://chromium-review.googlesource.com/c/1309734Reviewed-by: default avatarOskar Sundbom <ossu@chromium.org>
Commit-Queue: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604225}
parent 4376cbe6
...@@ -49,9 +49,9 @@ const int kRenderProcessId = 42; ...@@ -49,9 +49,9 @@ const int kRenderProcessId = 42;
const int kRenderFrameId = 24; const int kRenderFrameId = 24;
const float kWaveFrequency = 440.f; const float kWaveFrequency = 440.f;
const int kChannels = 1; const int kChannels = 1;
const int kBuffers = 1000; const int kBuffers = 100;
const int kSampleFrequency = 44100; const int kSampleFrequency = 8000;
const int kSamplesPerBuffer = kSampleFrequency / 100; const int kSamplesPerBuffer = kSampleFrequency / 10;
std::unique_ptr<media::AudioOutputStream::AudioSourceCallback> std::unique_ptr<media::AudioOutputStream::AudioSourceCallback>
GetTestAudioSource() { GetTestAudioSource() {
...@@ -206,8 +206,7 @@ class RendererAudioOutputStreamFactoryIntegrationTest : public Test { ...@@ -206,8 +206,7 @@ class RendererAudioOutputStreamFactoryIntegrationTest : public Test {
}; };
// It's flaky on the buildbot, http://crbug.com/761214. // It's flaky on the buildbot, http://crbug.com/761214.
TEST_F(RendererAudioOutputStreamFactoryIntegrationTest, TEST_F(RendererAudioOutputStreamFactoryIntegrationTest, StreamIntegrationTest) {
DISABLED_StreamIntegrationTest) {
// Sets up the factory on the IO thread and runs client code on the UI thread. // Sets up the factory on the IO thread and runs client code on the UI thread.
// Send a sine wave from the client and makes sure it's received by the output // Send a sine wave from the client and makes sure it's received by the output
// stream. // stream.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment