| 37 | brpc::SocketMapKey g_key(g_endpoint); |
| 38 | |
| 39 | void* worker(void*) { |
| 40 | const int ROUND = 2; |
| 41 | const int COUNT = 1000; |
| 42 | brpc::SocketId id; |
| 43 | for (int i = 0; i < ROUND * 2; ++i) { |
| 44 | for (int j = 0; j < COUNT; ++j) { |
| 45 | if (i % 2 == 0) { |
| 46 | EXPECT_EQ(0, brpc::SocketMapInsert(g_key, &id)); |
| 47 | } else { |
| 48 | brpc::SocketMapRemove(g_key); |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | return NULL; |
| 53 | } |
| 54 | |
| 55 | class SocketMapTest : public ::testing::Test{ |
| 56 | protected: |
nothing calls this directly
no test coverage detected