Join with a thread and emit warnings while waiting to join. This has to be manually verified.
| 45 | // Join with a thread and emit warnings while waiting to join. |
| 46 | // This has to be manually verified. |
| 47 | TEST_F(ThreadTest, TestJoinAndWarn) { |
| 48 | SKIP_IF_SLOW_NOT_ALLOWED(); |
| 49 | |
| 50 | scoped_refptr<Thread> holder; |
| 51 | ASSERT_OK(Thread::Create("test", "sleeper thread", |
| 52 | []() { usleep(1000*1000); }, &holder)); |
| 53 | ASSERT_OK(ThreadJoiner(holder.get()) |
| 54 | .warn_after_ms(10) |
| 55 | .warn_every_ms(100) |
| 56 | .Join()); |
| 57 | } |
| 58 | |
| 59 | TEST_F(ThreadTest, TestFailedJoin) { |
| 60 | SKIP_IF_SLOW_NOT_ALLOWED(); |
nothing calls this directly
no test coverage detected