summaryrefslogtreecommitdiffstats
path: root/src/bin/netconf/tests/netconf_unittests.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/netconf/tests/netconf_unittests.cc')
-rw-r--r--src/bin/netconf/tests/netconf_unittests.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/bin/netconf/tests/netconf_unittests.cc b/src/bin/netconf/tests/netconf_unittests.cc
index 289d58109c..b5a9e876dc 100644
--- a/src/bin/netconf/tests/netconf_unittests.cc
+++ b/src/bin/netconf/tests/netconf_unittests.cc
@@ -14,7 +14,6 @@
#include <asiolink/interval_timer.h>
#include <asiolink/io_service.h>
#include <cc/command_interpreter.h>
-#include <util/threads/thread.h>
#include <yang/yang_models.h>
#include <yang/yang_revisions.h>
#include <yang/translator_config.h>
@@ -24,6 +23,7 @@
#include <testutils/sandbox.h>
#include <gtest/gtest.h>
#include <sstream>
+#include <thread>
using namespace std;
using namespace isc;
@@ -35,7 +35,6 @@ using namespace isc::http;
using namespace isc::test;
using namespace isc::yang;
using namespace isc::yang::test;
-using namespace isc::util::thread;
#ifndef HAVE_PRE_0_7_6_SYSREPO
using namespace sysrepo;
#endif
@@ -46,7 +45,7 @@ namespace {
const string TEST_SOCKET = "test-socket";
/// @brief Type definition for the pointer to Thread objects.
-typedef boost::shared_ptr<Thread> ThreadPtr;
+typedef boost::shared_ptr<thread> ThreadPtr;
/// @brief Test version of the NetconfAgent class.
class NakedNetconfAgent : public NetconfAgent {
@@ -107,7 +106,7 @@ public:
virtual ~NetconfAgentTest() {
NetconfProcess::shut_down = true;
if (thread_) {
- thread_->wait();
+ thread_->join();
thread_.reset();
}
// io_service must be stopped after the thread returns,
@@ -191,7 +190,7 @@ public:
io_service_->stop();
io_service_.reset();
if (thread_) {
- thread_->wait();
+ thread_->join();
thread_.reset();
}
if (agent_) {
@@ -460,7 +459,7 @@ TEST_F(NetconfAgentLogTest, logChanges) {
EXPECT_NO_THROW(subs->module_change_subscribe(KEA_DHCP4_SERVER.c_str(),
cb, 0, 0,
SR_SUBSCR_APPLY_ONLY));
- thread_.reset(new Thread([this]() { io_service_->run(); }));
+ thread_.reset(new thread([this]() { io_service_->run(); }));
// Change configuration (subnet #1 moved from 10.0.0.0/24 to 10.0.1/0/24).
const YRTree tree1 = {
@@ -527,7 +526,7 @@ TEST_F(NetconfAgentLogTest, logChanges2) {
EXPECT_NO_THROW(subs->module_change_subscribe(KEA_DHCP4_SERVER.c_str(),
cb, 0, 0,
SR_SUBSCR_APPLY_ONLY));
- thread_.reset(new Thread([this]() { io_service_->run(); }));
+ thread_.reset(new thread([this]() { io_service_->run(); }));
// Change configuration (subnet #1 moved to #10).
string xpath = "/kea-dhcp4-server:config/subnet4[id='1']";
@@ -625,7 +624,7 @@ TEST_F(NetconfAgentTest, keaConfig) {
CfgServersMapPair service_pair = *servers_map->begin();
// Launch server.
- thread_.reset(new Thread([this]() { fakeServer(); signalStopped(); }));
+ thread_.reset(new thread([this]() { fakeServer(); signalStopped(); }));
// Wait until the server is listening.
waitReady();
@@ -726,7 +725,7 @@ TEST_F(NetconfAgentTest, yangConfig) {
CfgServersMapPair service_pair = *servers_map->begin();
// Launch server.
- thread_.reset(new Thread([this]() { fakeServer(); signalStopped();}));
+ thread_.reset(new thread([this]() { fakeServer(); signalStopped();}));
// Wait until the server is listening.
waitReady();
@@ -893,7 +892,7 @@ TEST_F(NetconfAgentTest, update) {
EXPECT_EQ(2, agent_->subscriptions_.size());
// Launch server.
- thread_.reset(new Thread([this]() { fakeServer(); signalStopped(); }));
+ thread_.reset(new thread([this]() { fakeServer(); signalStopped(); }));
// Wait until the server is listening.
waitReady();
@@ -1023,7 +1022,7 @@ TEST_F(NetconfAgentTest, validate) {
EXPECT_EQ(2, agent_->subscriptions_.size());
// Launch server twice.
- thread_.reset(new Thread([this]()
+ thread_.reset(new thread([this]()
{
fakeServer();
fakeServer();