| 148 | const int AUTH_ERR = -9; |
| 149 | |
| 150 | void* auth_fighter(void* arg) { |
| 151 | bthread_usleep(10000); |
| 152 | int auth_error = 0; |
| 153 | brpc::Socket* s = (brpc::Socket*)arg; |
| 154 | if (s->FightAuthentication(&auth_error) == 0) { |
| 155 | winner_count.fetch_add(1); |
| 156 | s->SetAuthentication(AUTH_ERR); |
| 157 | } else { |
| 158 | EXPECT_EQ(AUTH_ERR, auth_error); |
| 159 | } |
| 160 | return NULL; |
| 161 | } |
| 162 | |
| 163 | TEST_F(SocketTest, authentication) { |
| 164 | brpc::SocketId id; |
nothing calls this directly
no test coverage detected