Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions mcrouter/lib/network/test/MockMcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
#include <glog/logging.h>

#include <folly/Format.h>
#include <folly/Singleton.h>
#include <folly/init/Init.h>
#include <folly/logging/Init.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/gen/MemcacheServer.h"
#include "mcrouter/lib/network/test/MockMc.h"
#include "mcrouter/lib/network/test/MockMcOnRequest.h"

/**
Expand Down Expand Up @@ -69,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";
Expand Down
6 changes: 2 additions & 4 deletions mcrouter/lib/network/test/MockMcServerDual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <glog/logging.h>

#include <folly/Format.h>
#include <folly/Singleton.h>
#include <folly/executors/IOThreadPoolExecutor.h>
#include <folly/init/Init.h>
#include <folly/io/async/AsyncSignalHandler.h>
#include <folly/io/async/EventBase.h>
#include <folly/logging/Init.h>
Expand All @@ -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"

Expand Down Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions mcrouter/lib/network/test/MockMcThriftServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <glog/logging.h>

#include <folly/Format.h>
#include <folly/Singleton.h>
#include <folly/init/Init.h>
#include <folly/logging/Init.h>
#include <thrift/lib/cpp2/server/ThriftServer.h>

Expand Down Expand Up @@ -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;
Expand Down
Loading