MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / testReconfigure

Function testReconfigure

deps/cpp-statsd-client/tests/testStatsdClient.cpp:56–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void testReconfigure() {
57 StatsdServer server;
58 throwOnError(server);
59
60 StatsdClient client("localhost", 8125, "first.");
61 client.increment("foo");
62 throwOnWrongMessage(server, "first.foo:1|c");
63
64 client.setConfig("localhost", 8125, "second");
65 client.increment("bar");
66 throwOnWrongMessage(server, "second.bar:1|c");
67
68 client.setConfig("localhost", 8125, "");
69 client.increment("third.baz");
70 throwOnWrongMessage(server, "third.baz:1|c");
71
72 client.increment("");
73 throwOnWrongMessage(server, ":1|c");
74
75 // TODO: test what happens with the batching after resolving the question about incomplete
76 // batches being dropped vs sent on reconfiguring
77}
78
79void testSendRecv(uint64_t batchSize, uint64_t sendInterval) {
80 StatsdServer mock_server;

Callers 1

mainFunction · 0.85

Calls 4

throwOnErrorFunction · 0.85
throwOnWrongMessageFunction · 0.85
setConfigMethod · 0.80
incrementMethod · 0.45

Tested by

no test coverage detected