summaryrefslogtreecommitdiffstats
path: root/src/lib/config
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2021-08-23 18:24:42 +0200
committerRazvan Becheriu <razvan@isc.org>2021-08-24 20:52:09 +0200
commit220ef22da0d0ce3e9ea2a2413c6c5bddddc34b6b (patch)
tree7cbdcaa7a7826b205c32dd9082d8bab4bb8207ae /src/lib/config
parent[#2043] safety measures for illegal opetations on thread pool done by owned t... (diff)
downloadkea-220ef22da0d0ce3e9ea2a2413c6c5bddddc34b6b.tar.xz
kea-220ef22da0d0ce3e9ea2a2413c6c5bddddc34b6b.zip
[#2043] added critical section with exceptions unittests
Diffstat (limited to 'src/lib/config')
-rw-r--r--src/lib/config/tests/cmd_http_listener_unittests.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/config/tests/cmd_http_listener_unittests.cc b/src/lib/config/tests/cmd_http_listener_unittests.cc
index 55b2fbf25c..4eca580ff6 100644
--- a/src/lib/config/tests/cmd_http_listener_unittests.cc
+++ b/src/lib/config/tests/cmd_http_listener_unittests.cc
@@ -241,10 +241,6 @@ public:
const ConstElementPtr& /*command_arguments*/) {
ElementPtr arguments = Element::createList();
arguments->add(Element::create("bar"));
- EXPECT_THROW(listener_->start(), InvalidOperation);
- EXPECT_THROW(listener_->pause(), MultiThreadingInvalidOperation);
- EXPECT_THROW(listener_->resume(), MultiThreadingInvalidOperation);
- EXPECT_THROW(listener_->stop(), MultiThreadingInvalidOperation);
return (createAnswer(CONTROL_RESULT_SUCCESS, arguments));
}
@@ -311,6 +307,11 @@ public:
}
}
+ EXPECT_THROW(listener_->start(), InvalidOperation);
+ EXPECT_THROW(listener_->pause(), MultiThreadingInvalidOperation);
+ EXPECT_THROW(listener_->resume(), MultiThreadingInvalidOperation);
+ EXPECT_THROW(listener_->stop(), MultiThreadingInvalidOperation);
+
// We're done, ship it!
return (createAnswer(CONTROL_RESULT_SUCCESS, arguments));
}