aboutsummaryrefslogtreecommitdiffstats
path: root/slobrok/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-30 00:17:46 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-30 00:17:46 +0200
commitac40360439b406d700c417076ec169f509468269 (patch)
tree5f41d4445fc398aa360810de0df9ee3a8c8a7aa2 /slobrok/src/tests
parentb5434960947f06f914569324d0b5e803eb7d4eef (diff)
Reduce exposure of fastos.h and frt.h.
Only include what you need where you need it.
Diffstat (limited to 'slobrok/src/tests')
-rw-r--r--slobrok/src/tests/backoff/testbackoff.cpp7
-rw-r--r--slobrok/src/tests/configure/configure.cpp10
-rw-r--r--slobrok/src/tests/configure/gencfg.cpp5
-rw-r--r--slobrok/src/tests/mirrorapi/mirrorapi.cpp9
-rw-r--r--slobrok/src/tests/oldapi/mirror.cpp14
-rw-r--r--slobrok/src/tests/oldapi/mirror.h10
-rw-r--r--slobrok/src/tests/oldapi/old.cpp9
-rw-r--r--slobrok/src/tests/registerapi/registerapi.cpp8
-rw-r--r--slobrok/src/tests/standalone/standalone.cpp5
-rw-r--r--slobrok/src/tests/startsome/rpc_info.cpp5
-rw-r--r--slobrok/src/tests/startsome/tstdst.cpp5
11 files changed, 47 insertions, 40 deletions
diff --git a/slobrok/src/tests/backoff/testbackoff.cpp b/slobrok/src/tests/backoff/testbackoff.cpp
index af0dbd5bc81..f64ca79917c 100644
--- a/slobrok/src/tests/backoff/testbackoff.cpp
+++ b/slobrok/src/tests/backoff/testbackoff.cpp
@@ -1,10 +1,9 @@
// 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/log/log.h>
-LOG_SETUP("backoff_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/slobrok/backoff.h>
-#include <algorithm>
+
+#include <vespa/log/log.h>
+LOG_SETUP("backoff_test");
using slobrok::api::BackOff;
diff --git a/slobrok/src/tests/configure/configure.cpp b/slobrok/src/tests/configure/configure.cpp
index e8977f678e4..086917dd5d7 100644
--- a/slobrok/src/tests/configure/configure.cpp
+++ b/slobrok/src/tests/configure/configure.cpp
@@ -1,17 +1,19 @@
// 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/log/log.h>
-LOG_SETUP("configure_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/slobrok/sbregister.h>
#include <vespa/slobrok/server/slobrokserver.h>
#include <vespa/config/config.h>
#include <vespa/config-slobroks.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/vespalib/util/host_name.h>
#include <sstream>
#include <algorithm>
#include <iostream>
-#include <vespa/vespalib/util/host_name.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("configure_test");
using slobrok::api::MirrorAPI;
using slobrok::api::RegisterAPI;
diff --git a/slobrok/src/tests/configure/gencfg.cpp b/slobrok/src/tests/configure/gencfg.cpp
index 85cc8629830..8e0de4abb8c 100644
--- a/slobrok/src/tests/configure/gencfg.cpp
+++ b/slobrok/src/tests/configure/gencfg.cpp
@@ -1,9 +1,6 @@
// 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 <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
#include <vespa/vespalib/util/host_name.h>
+#include <cstdio>
int
main(int, char **)
diff --git a/slobrok/src/tests/mirrorapi/mirrorapi.cpp b/slobrok/src/tests/mirrorapi/mirrorapi.cpp
index 4370931b785..4a1f4f023ca 100644
--- a/slobrok/src/tests/mirrorapi/mirrorapi.cpp
+++ b/slobrok/src/tests/mirrorapi/mirrorapi.cpp
@@ -1,12 +1,15 @@
// 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/log/log.h>
-LOG_SETUP("mirrorapi_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/config-slobroks.h>
#include <algorithm>
#include <vespa/slobrok/server/slobrokserver.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("mirrorapi_test");
using slobrok::api::MirrorAPI;
using slobrok::SlobrokServer;
diff --git a/slobrok/src/tests/oldapi/mirror.cpp b/slobrok/src/tests/oldapi/mirror.cpp
index 22304091395..fb9fa167c32 100644
--- a/slobrok/src/tests/oldapi/mirror.cpp
+++ b/slobrok/src/tests/oldapi/mirror.cpp
@@ -1,13 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include "mirror.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".slobrok.mirror");
-#include <vespa/fastos/fastos.h>
-#include <vespa/fnet/frt/frt.h>
-#include "mirror.h"
-#include <memory>
-namespace slobrok {
-namespace api {
+namespace slobrok::api {
MirrorOld::MirrorOld(FRT_Supervisor &orb, const std::vector<std::string> &slobroks)
@@ -171,5 +170,4 @@ MirrorOld::RequestDone(FRT_RPCRequest *req)
ScheduleNow();
}
-} // namespace api
-} // namespace slobrok
+} // namespace slobrok::api
diff --git a/slobrok/src/tests/oldapi/mirror.h b/slobrok/src/tests/oldapi/mirror.h
index b83392dec5e..b6259c76b7e 100644
--- a/slobrok/src/tests/oldapi/mirror.h
+++ b/slobrok/src/tests/oldapi/mirror.h
@@ -1,12 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
#include <vespa/vespalib/util/gencnt.h>
#include <vespa/slobrok/backoff.h>
+#include <vespa/fnet/frt/invoker.h>
-namespace slobrok {
-namespace api {
+class FRT_Target;
+
+namespace slobrok::api {
/**
* @brief Defines an interface for the name server lookup.
@@ -122,5 +123,4 @@ private:
FRT_RPCRequest *_req;
};
-} // namespace api
-} // namespace slobrok
+} // namespace slobrok::api
diff --git a/slobrok/src/tests/oldapi/old.cpp b/slobrok/src/tests/oldapi/old.cpp
index 8b620cda3b2..23cde98674f 100644
--- a/slobrok/src/tests/oldapi/old.cpp
+++ b/slobrok/src/tests/oldapi/old.cpp
@@ -1,12 +1,13 @@
// 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/log/log.h>
-LOG_SETUP("mirrorapi_test");
#include <vespa/vespalib/testkit/testapp.h>
#include "mirror.h"
#include <vespa/config-slobroks.h>
-#include <algorithm>
#include <vespa/slobrok/server/slobrokserver.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("mirrorapi_test");
using slobrok::api::MirrorOld;
using slobrok::SlobrokServer;
diff --git a/slobrok/src/tests/registerapi/registerapi.cpp b/slobrok/src/tests/registerapi/registerapi.cpp
index 8e4cb2404f9..e61a28e3c28 100644
--- a/slobrok/src/tests/registerapi/registerapi.cpp
+++ b/slobrok/src/tests/registerapi/registerapi.cpp
@@ -1,15 +1,17 @@
// 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/log/log.h>
-LOG_SETUP("registerapi_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/host_name.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/slobrok/sbregister.h>
#include <vespa/slobrok/server/slobrokserver.h>
+#include <vespa/fnet/frt/supervisor.h>
#include <sstream>
#include <algorithm>
+#include <vespa/log/log.h>
+LOG_SETUP("registerapi_test");
+
using slobrok::api::MirrorAPI;
using slobrok::api::RegisterAPI;
using slobrok::SlobrokServer;
diff --git a/slobrok/src/tests/standalone/standalone.cpp b/slobrok/src/tests/standalone/standalone.cpp
index 7cae6eabbad..9d9ccbdeadd 100644
--- a/slobrok/src/tests/standalone/standalone.cpp
+++ b/slobrok/src/tests/standalone/standalone.cpp
@@ -1,9 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/fnet/frt/frt.h>
#include <vespa/slobrok/server/slobrokserver.h>
-#include <string>
-
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
//-----------------------------------------------------------------------------
diff --git a/slobrok/src/tests/startsome/rpc_info.cpp b/slobrok/src/tests/startsome/rpc_info.cpp
index be5418ff1a8..40e4db46bf5 100644
--- a/slobrok/src/tests/startsome/rpc_info.cpp
+++ b/slobrok/src/tests/startsome/rpc_info.cpp
@@ -1,7 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fnet/frt/frt.h>
#include <vespa/fastos/app.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/rpcrequest.h>
+#include <vespa/fnet/frt/target.h>
+
class RPCInfo : public FastOS_Application
{
diff --git a/slobrok/src/tests/startsome/tstdst.cpp b/slobrok/src/tests/startsome/tstdst.cpp
index 7d3fcef8695..577bf6f59a1 100644
--- a/slobrok/src/tests/startsome/tstdst.cpp
+++ b/slobrok/src/tests/startsome/tstdst.cpp
@@ -1,8 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/util/host_name.h>
-#include <vespa/fnet/frt/frt.h>
#include <vespa/fastos/app.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/invoker.h>
+#include <vespa/fnet/transport.h>
+#include <vespa/fnet/frt/target.h>
#include <vespa/log/log.h>
LOG_SETUP("testrpcserver");