diff --git a/mcrouter/lib/network/test/MockMcServer.cpp b/mcrouter/lib/network/test/MockMcServer.cpp index 2a948c44a..33943280f 100644 --- a/mcrouter/lib/network/test/MockMcServer.cpp +++ b/mcrouter/lib/network/test/MockMcServer.cpp @@ -13,16 +13,13 @@ #include #include -#include +#include #include #include "mcrouter/lib/network/AsyncMcServer.h" #include "mcrouter/lib/network/AsyncMcServerWorker.h" -#include "mcrouter/lib/network/CarbonMessageDispatcher.h" #include "mcrouter/lib/network/McServerRequestContext.h" -#include "mcrouter/lib/network/gen/MemcacheMessages.h" #include "mcrouter/lib/network/gen/MemcacheServer.h" -#include "mcrouter/lib/network/test/MockMc.h" #include "mcrouter/lib/network/test/MockMcOnRequest.h" /** @@ -70,7 +67,7 @@ void serverLoop( FOLLY_INIT_LOGGING_CONFIG(".=WARNING,folly=INFO; default:async=true"); int main(int argc, char** argv) { - folly::SingletonVault::singleton()->registrationComplete(); + folly::Init init(&argc, &argv, folly::InitOptions{}.useGFlags(false).removeFlags(false)); AsyncMcServer::Options opts; opts.worker.versionString = "MockMcServer-1.0"; diff --git a/mcrouter/lib/network/test/MockMcServerDual.cpp b/mcrouter/lib/network/test/MockMcServerDual.cpp index 21a2e4d03..6b87d88d0 100644 --- a/mcrouter/lib/network/test/MockMcServerDual.cpp +++ b/mcrouter/lib/network/test/MockMcServerDual.cpp @@ -13,8 +13,8 @@ #include #include -#include #include +#include #include #include #include @@ -23,8 +23,6 @@ #include "mcrouter/ExecutorObserver.h" #include "mcrouter/lib/network/AsyncMcServer.h" #include "mcrouter/lib/network/AsyncMcServerWorker.h" -#include "mcrouter/lib/network/CarbonMessageDispatcher.h" -#include "mcrouter/lib/network/McServerRequestContext.h" #include "mcrouter/lib/network/ServerLoad.h" #include "mcrouter/lib/network/test/MockMcThriftServerHandler.h" @@ -98,7 +96,7 @@ class ShutdownSignalHandler : public folly::AsyncSignalHandler { }; int main(int argc, char** argv) { - folly::SingletonVault::singleton()->registrationComplete(); + folly::Init init(&argc, &argv, folly::InitOptions{}.useGFlags(false).removeFlags(false)); AsyncMcServer::Options asyncOpts; asyncOpts.worker.versionString = "MockMcServer-1.0"; diff --git a/mcrouter/lib/network/test/MockMcThriftServer.cpp b/mcrouter/lib/network/test/MockMcThriftServer.cpp index 966d980be..c8e448a7c 100644 --- a/mcrouter/lib/network/test/MockMcThriftServer.cpp +++ b/mcrouter/lib/network/test/MockMcThriftServer.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -52,7 +52,7 @@ void sigHandler(int /* signo */) { } int main(int argc, char** argv) { - folly::SingletonVault::singleton()->registrationComplete(); + folly::Init init(&argc, &argv, folly::InitOptions{}.useGFlags(false).removeFlags(false)); uint16_t port = 0; int existingSocketFd = 0;