Commit b577fde8 authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Disable WebRtcAudioRendererTest on TSAN

These tests are flaking frequently on TSAN.

Bug: 1127211
Change-Id: I063e6435f5c33659bfdc2f21c5a38b55cbaf9881
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442791
Auto-Submit: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarMarina Ciocea <marinaciocea@chromium.org>
Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812723}
parent 2a3df1d4
...@@ -112,7 +112,13 @@ class AudioDeviceFactoryTestingPlatformSupport : public blink::Platform { ...@@ -112,7 +112,13 @@ class AudioDeviceFactoryTestingPlatformSupport : public blink::Platform {
} // namespace } // namespace
class WebRtcAudioRendererTest : public testing::Test { // Flaky on TSAN. See https://crbug.com/1127211
#if defined(THREAD_SANITIZER)
#define MAYBE_WebRtcAudioRendererTest DISABLED_WebRtcAudioRendererTest
#else
#define MAYBE_WebRtcAudioRendererTest WebRtcAudioRendererTest
#endif
class MAYBE_WebRtcAudioRendererTest : public testing::Test {
public: public:
MOCK_METHOD1(MockSwitchDeviceCallback, void(media::OutputDeviceStatus)); MOCK_METHOD1(MockSwitchDeviceCallback, void(media::OutputDeviceStatus));
void SwitchDeviceCallback(base::RunLoop* loop, void SwitchDeviceCallback(base::RunLoop* loop,
...@@ -122,7 +128,7 @@ class WebRtcAudioRendererTest : public testing::Test { ...@@ -122,7 +128,7 @@ class WebRtcAudioRendererTest : public testing::Test {
} }
protected: protected:
WebRtcAudioRendererTest() MAYBE_WebRtcAudioRendererTest()
: source_(new MockAudioRendererSource()) : source_(new MockAudioRendererSource())
// Tests crash on Android if these are defined. https://crbug.com/1119689 // Tests crash on Android if these are defined. https://crbug.com/1119689
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
...@@ -216,7 +222,7 @@ class WebRtcAudioRendererTest : public testing::Test { ...@@ -216,7 +222,7 @@ class WebRtcAudioRendererTest : public testing::Test {
}; };
// Verify that the renderer will be stopped if the only proxy is stopped. // Verify that the renderer will be stopped if the only proxy is stopped.
TEST_F(WebRtcAudioRendererTest, StopRenderer) { TEST_F(MAYBE_WebRtcAudioRendererTest, StopRenderer) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
renderer_proxy_->Start(); renderer_proxy_->Start();
...@@ -229,7 +235,7 @@ TEST_F(WebRtcAudioRendererTest, StopRenderer) { ...@@ -229,7 +235,7 @@ TEST_F(WebRtcAudioRendererTest, StopRenderer) {
// Verify that the renderer will not be stopped unless the last proxy is // Verify that the renderer will not be stopped unless the last proxy is
// stopped. // stopped.
TEST_F(WebRtcAudioRendererTest, MultipleRenderers) { TEST_F(MAYBE_WebRtcAudioRendererTest, MultipleRenderers) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
renderer_proxy_->Start(); renderer_proxy_->Start();
...@@ -263,7 +269,7 @@ TEST_F(WebRtcAudioRendererTest, MultipleRenderers) { ...@@ -263,7 +269,7 @@ TEST_F(WebRtcAudioRendererTest, MultipleRenderers) {
// Verify that the sink of the renderer is using the expected sample rate and // Verify that the sink of the renderer is using the expected sample rate and
// buffer size. // buffer size.
TEST_F(WebRtcAudioRendererTest, VerifySinkParameters) { TEST_F(MAYBE_WebRtcAudioRendererTest, VerifySinkParameters) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
renderer_proxy_->Start(); renderer_proxy_->Start();
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \ #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \
...@@ -285,7 +291,7 @@ TEST_F(WebRtcAudioRendererTest, VerifySinkParameters) { ...@@ -285,7 +291,7 @@ TEST_F(WebRtcAudioRendererTest, VerifySinkParameters) {
renderer_proxy_->Stop(); renderer_proxy_->Stop();
} }
TEST_F(WebRtcAudioRendererTest, NonDefaultDevice) { TEST_F(MAYBE_WebRtcAudioRendererTest, NonDefaultDevice) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
EXPECT_EQ(kDefaultOutputDeviceId, EXPECT_EQ(kDefaultOutputDeviceId,
mock_sink()->GetOutputDeviceInfo().device_id()); mock_sink()->GetOutputDeviceInfo().device_id());
...@@ -305,7 +311,7 @@ TEST_F(WebRtcAudioRendererTest, NonDefaultDevice) { ...@@ -305,7 +311,7 @@ TEST_F(WebRtcAudioRendererTest, NonDefaultDevice) {
renderer_proxy_->Stop(); renderer_proxy_->Stop();
} }
TEST_F(WebRtcAudioRendererTest, SwitchOutputDevice) { TEST_F(MAYBE_WebRtcAudioRendererTest, SwitchOutputDevice) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
EXPECT_EQ(kDefaultOutputDeviceId, EXPECT_EQ(kDefaultOutputDeviceId,
mock_sink()->GetOutputDeviceInfo().device_id()); mock_sink()->GetOutputDeviceInfo().device_id());
...@@ -325,7 +331,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDevice) { ...@@ -325,7 +331,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDevice) {
base::RunLoop loop; base::RunLoop loop;
renderer_proxy_->SwitchOutputDevice( renderer_proxy_->SwitchOutputDevice(
kOtherOutputDeviceId, kOtherOutputDeviceId,
base::BindOnce(&WebRtcAudioRendererTest::SwitchDeviceCallback, base::BindOnce(&MAYBE_WebRtcAudioRendererTest::SwitchDeviceCallback,
base::Unretained(this), &loop)); base::Unretained(this), &loop));
loop.Run(); loop.Run();
EXPECT_EQ(kOtherOutputDeviceId, EXPECT_EQ(kOtherOutputDeviceId,
...@@ -340,7 +346,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDevice) { ...@@ -340,7 +346,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDevice) {
renderer_proxy_->Stop(); renderer_proxy_->Stop();
} }
TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) { TEST_F(MAYBE_WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
EXPECT_EQ(kDefaultOutputDeviceId, EXPECT_EQ(kDefaultOutputDeviceId,
mock_sink()->GetOutputDeviceInfo().device_id()); mock_sink()->GetOutputDeviceInfo().device_id());
...@@ -357,7 +363,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) { ...@@ -357,7 +363,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) {
base::RunLoop loop; base::RunLoop loop;
renderer_proxy_->SwitchOutputDevice( renderer_proxy_->SwitchOutputDevice(
kInvalidOutputDeviceId, kInvalidOutputDeviceId,
base::BindOnce(&WebRtcAudioRendererTest::SwitchDeviceCallback, base::BindOnce(&MAYBE_WebRtcAudioRendererTest::SwitchDeviceCallback,
base::Unretained(this), &loop)); base::Unretained(this), &loop));
loop.Run(); loop.Run();
EXPECT_EQ(kDefaultOutputDeviceId, EXPECT_EQ(kDefaultOutputDeviceId,
...@@ -372,7 +378,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) { ...@@ -372,7 +378,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceInvalidDevice) {
renderer_proxy_->Stop(); renderer_proxy_->Stop();
} }
TEST_F(WebRtcAudioRendererTest, InitializeWithInvalidDevice) { TEST_F(MAYBE_WebRtcAudioRendererTest, InitializeWithInvalidDevice) {
renderer_ = new blink::WebRtcAudioRenderer( renderer_ = new blink::WebRtcAudioRenderer(
scheduler::GetSingleThreadTaskRunnerForTesting(), stream_descriptor_, scheduler::GetSingleThreadTaskRunnerForTesting(), stream_descriptor_,
nullptr /*blink::WebLocalFrame*/, base::UnguessableToken::Create(), nullptr /*blink::WebLocalFrame*/, base::UnguessableToken::Create(),
...@@ -397,7 +403,7 @@ TEST_F(WebRtcAudioRendererTest, InitializeWithInvalidDevice) { ...@@ -397,7 +403,7 @@ TEST_F(WebRtcAudioRendererTest, InitializeWithInvalidDevice) {
mock_sink()->GetOutputDeviceInfo().device_id()); mock_sink()->GetOutputDeviceInfo().device_id());
} }
TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceStoppedSource) { TEST_F(MAYBE_WebRtcAudioRendererTest, SwitchOutputDeviceStoppedSource) {
SetupRenderer(kDefaultOutputDeviceId); SetupRenderer(kDefaultOutputDeviceId);
auto* original_sink = mock_sink(); auto* original_sink = mock_sink();
renderer_proxy_->Start(); renderer_proxy_->Start();
...@@ -410,7 +416,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceStoppedSource) { ...@@ -410,7 +416,7 @@ TEST_F(WebRtcAudioRendererTest, SwitchOutputDeviceStoppedSource) {
renderer_proxy_->Stop(); renderer_proxy_->Stop();
renderer_proxy_->SwitchOutputDevice( renderer_proxy_->SwitchOutputDevice(
kInvalidOutputDeviceId, kInvalidOutputDeviceId,
base::BindOnce(&WebRtcAudioRendererTest::SwitchDeviceCallback, base::BindOnce(&MAYBE_WebRtcAudioRendererTest::SwitchDeviceCallback,
base::Unretained(this), &loop)); base::Unretained(this), &loop));
loop.Run(); loop.Run();
} }
......
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