Lines Matching refs:servers

146         std::vector<std::string> servers;  in TEST_F()  member
178 for (const auto& [servers, expectation, isSuccess] : tests) { in TEST_F()
180 ipSockAddrs.reserve(servers.size()); in TEST_F()
181 for (const auto& server : servers) { in TEST_F()
204 const std::vector<IPSockAddr> servers = { in TEST_F() local
212 EXPECT_FALSE(mDnsStats.setServers(servers, PROTO_TCP)); in TEST_F()
213 EXPECT_FALSE(mDnsStats.setServers(servers, PROTO_UDP)); in TEST_F()
214 EXPECT_FALSE(mDnsStats.setServers(servers, PROTO_DOT)); in TEST_F()
221 EXPECT_TRUE(mDnsStats.setServers(std::vector(servers.begin() + 2, servers.end()), PROTO_TCP)); in TEST_F()
222 EXPECT_TRUE(mDnsStats.setServers(std::vector(servers.begin() + 2, servers.end()), PROTO_UDP)); in TEST_F()
223 EXPECT_TRUE(mDnsStats.setServers(std::vector(servers.begin() + 2, servers.end()), PROTO_DOT)); in TEST_F()
226 makeStatsData(servers[2], 0, 0ms, {}), makeStatsData(servers[3], 0, 0ms, {}), in TEST_F()
227 makeStatsData(servers[4], 0, 0ms, {}), makeStatsData(servers[5], 0, 0ms, {}), in TEST_F()
228 makeStatsData(servers[6], 0, 0ms, {}), makeStatsData(servers[7], 0, 0ms, {}), in TEST_F()
238 const std::vector<IPSockAddr> servers = { in TEST_F() local
244 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_TCP)); in TEST_F()
245 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_UDP)); in TEST_F()
251 EXPECT_TRUE(mDnsStats.addStats(servers[0], record)); in TEST_F()
252 EXPECT_TRUE(mDnsStats.addStats(servers[0], record)); in TEST_F()
253 EXPECT_TRUE(mDnsStats.addStats(servers[1], record)); in TEST_F()
256 makeStatsData(servers[0], 0, 0ms, {}), in TEST_F()
257 makeStatsData(servers[1], 0, 0ms, {}), in TEST_F()
260 makeStatsData(servers[0], 2, 20ms, {{NS_R_NO_ERROR, 2}}), in TEST_F()
261 makeStatsData(servers[1], 1, 10ms, {{NS_R_NO_ERROR, 1}}), in TEST_F()
280 std::vector<IPSockAddr> servers = { in TEST_F() local
287 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_UDP)); in TEST_F()
290 EXPECT_TRUE(mDnsStats.addStats(servers[0], recordNoError)); in TEST_F()
293 EXPECT_TRUE(mDnsStats.addStats(servers[1], recordNoError)); in TEST_F()
294 EXPECT_TRUE(mDnsStats.addStats(servers[1], recordNoError)); in TEST_F()
295 EXPECT_TRUE(mDnsStats.addStats(servers[1], recordTimeout)); in TEST_F()
296 EXPECT_TRUE(mDnsStats.addStats(servers[1], recordTimeout)); in TEST_F()
299 makeStatsData(servers[0], 1, 10ms, {{NS_R_NO_ERROR, 1}}), in TEST_F()
300 makeStatsData(servers[1], 4, 520ms, {{NS_R_NO_ERROR, 2}, {NS_R_TIMEOUT, 2}}), in TEST_F()
306 servers = { in TEST_F()
311 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_UDP)); in TEST_F()
313 makeStatsData(servers[0], 4, 520ms, {{NS_R_NO_ERROR, 2}, {NS_R_TIMEOUT, 2}}), in TEST_F()
314 makeStatsData(servers[1], 0, 0ms, {}), in TEST_F()
315 makeStatsData(servers[2], 0, 0ms, {}), in TEST_F()
321 EXPECT_TRUE(mDnsStats.addStats(servers[0], recordNoError)); in TEST_F()
323 makeStatsData(servers[0], 5, 530ms, {{NS_R_NO_ERROR, 3}, {NS_R_TIMEOUT, 2}}), in TEST_F()
324 makeStatsData(servers[1], 0, 0ms, {}), in TEST_F()
325 makeStatsData(servers[2], 0, 0ms, {}), in TEST_F()
337 const std::vector<IPSockAddr> servers = { in TEST_F() local
352 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_TCP)); in TEST_F()
353 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_UDP)); in TEST_F()
354 EXPECT_TRUE(mDnsStats.setServers(servers, PROTO_DOT)); in TEST_F()
361 for (const auto& server : servers) { in TEST_F()
374 makeStatsData(servers[0], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
375 makeStatsData(servers[1], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
376 makeStatsData(servers[2], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
377 makeStatsData(servers[3], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
450 const auto servers = mDnsStats.getSortedServers(PROTO_UDP); in TEST_F() local
451 EXPECT_EQ(servers.size(), 4U); in TEST_F()
452 if (servers[0] == server1) { in TEST_F()
454 EXPECT_TRUE(mDnsStats.addStats(servers[0], in TEST_F()
457 } else if (servers[0] == server2) { in TEST_F()
459 EXPECT_TRUE(mDnsStats.addStats(servers[0], in TEST_F()
462 } else if (servers[0] == server3) { in TEST_F()
464 EXPECT_TRUE(mDnsStats.addStats(servers[0], in TEST_F()
466 } else if (servers[0] == server4) { in TEST_F()
468 EXPECT_TRUE(mDnsStats.addStats(servers[0], in TEST_F()