| 225 | } |
| 226 | |
| 227 | static bool WaitForTrue(const std::atomic<bool>& f, int timeout_ms) { |
| 228 | const int64_t deadline_us = butil::gettimeofday_us() + (int64_t)timeout_ms * 1000L; |
| 229 | while (!f.load(std::memory_order_acquire) && butil::gettimeofday_us() < deadline_us) { |
| 230 | usleep(1000); |
| 231 | } |
| 232 | return f.load(std::memory_order_acquire); |
| 233 | } |
| 234 | |
| 235 | TEST_F(StreamingRpcTest, sanity) { |
| 236 | brpc::Server server; |
no test coverage detected