Index: webrtc/base/platform_thread_unittest.cc |
diff --git a/webrtc/base/platform_thread_unittest.cc b/webrtc/base/platform_thread_unittest.cc |
index d6d35e40e4955dfe82367ac29e3ed2de00c1efbf..207a53f2a409ae47958cad391b7910e64552b201 100644 |
--- a/webrtc/base/platform_thread_unittest.cc |
+++ b/webrtc/base/platform_thread_unittest.cc |
@@ -17,7 +17,12 @@ namespace rtc { |
namespace { |
// Function that does nothing, and reports success. |
bool NullRunFunctionDeprecated(void* obj) { |
- webrtc::SleepMs(0); // Hand over timeslice, prevents busy looping. |
+ webrtc::SleepMs(2); // Hand over timeslice, prevents busy looping. |
+ return true; |
+} |
+ |
+bool TooBusyRunFunction(void* obj) { |
+ // Indentionally busy looping. |
return true; |
} |
@@ -108,4 +113,11 @@ TEST(PlatformThreadTest, RunFunctionIsCalled) { |
EXPECT_TRUE(flag); |
} |
+TEST(PlatformThreadTest, DISABLED_TooBusyDeprecated) { |
the sun
2017/03/02 14:20:09
nit: Can you use DEATH_TEST?
tommi
2017/03/02 14:34:55
I did look into that but couldn't figure out a goo
|
+ PlatformThread thread(&TooBusyRunFunction, nullptr, "BusyThread"); |
+ thread.Start(); |
+ webrtc::SleepMs(1000); |
+ thread.Stop(); |
+} |
+ |
} // rtc |