diff options
author | Arne H Juul <arnej27959@users.noreply.github.com> | 2017-04-24 12:10:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 12:10:42 +0200 |
commit | 9ff4bdb407ed8d855a3f86a17c99906ff738177b (patch) | |
tree | fc2b050224d7dde92d57e1f9cac12c1e5aaf6b90 /staging_vespalib/src/tests/state_server/state_server_test.cpp | |
parent | 32ae190acc9ac5081049e1c7008d1602c68cf821 (diff) |
Revert "Balder/enforce override 2"
Diffstat (limited to 'staging_vespalib/src/tests/state_server/state_server_test.cpp')
-rw-r--r-- | staging_vespalib/src/tests/state_server/state_server_test.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/staging_vespalib/src/tests/state_server/state_server_test.cpp b/staging_vespalib/src/tests/state_server/state_server_test.cpp index e15a3826669..f572dbcd8e1 100644 --- a/staging_vespalib/src/tests/state_server/state_server_test.cpp +++ b/staging_vespalib/src/tests/state_server/state_server_test.cpp @@ -1,5 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - +#include <vespa/fastos/fastos.h> #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/vespalib/net/state_server.h> #include <vespa/vespalib/net/simple_health_producer.h> @@ -52,8 +52,10 @@ vespalib::string getFull(int port, const vespalib::string &path) { return getPag struct DummyHandler : JsonGetHandler { vespalib::string result; DummyHandler(const vespalib::string &result_in) : result(result_in) {} - vespalib::string get(const vespalib::string &, const vespalib::string &, - const std::map<vespalib::string,vespalib::string> &) const override + virtual vespalib::string get(const vespalib::string &, + const vespalib::string &, + const std::map<vespalib::string,vespalib::string> &) + const override { return result; } @@ -111,8 +113,10 @@ TEST_FFFF("require that handler is selected based on longest matching url prefix } struct EchoHost : JsonGetHandler { - vespalib::string get(const vespalib::string &host, const vespalib::string &, - const std::map<vespalib::string,vespalib::string> &) const override + virtual vespalib::string get(const vespalib::string &host, + const vespalib::string &, + const std::map<vespalib::string,vespalib::string> &) + const override { return "[\"" + host + "\"]"; } @@ -312,11 +316,11 @@ TEST_FFFFF("require that custom handlers can be added to the state server", } struct EchoConsumer : MetricsProducer { - vespalib::string getMetrics(const vespalib::string &consumer) override { + virtual vespalib::string getMetrics(const vespalib::string &consumer) override { return "[\"" + consumer + "\"]"; } - vespalib::string getTotalMetrics(const vespalib::string &consumer) override { - return "[\"" + consumer + "\"]"; + virtual vespalib::string getTotalMetrics(const vespalib::string &consumer) override { + return "[\"" + consumer + "\"]"; } }; |