diff options
author | Razvan Becheriu <razvan@isc.org> | 2020-08-18 20:47:18 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2020-08-18 22:11:25 +0200 |
commit | d86ef62b6c3aa3c5c9815a70c3e99dc4f35006de (patch) | |
tree | 3386dd587cc201d30c8f402341d3d8bd7fdbe275 /src/bin/dhcp4/tests | |
parent | [#1305] add thread and queue info to get-status command (diff) | |
download | kea-d86ef62b6c3aa3c5c9815a70c3e99dc4f35006de.tar.xz kea-d86ef62b6c3aa3c5c9815a70c3e99dc4f35006de.zip |
[#1305] addresses comments
Diffstat (limited to 'src/bin/dhcp4/tests')
-rw-r--r-- | src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc index 22efe381e0..e601e8d309 100644 --- a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc @@ -1120,6 +1120,16 @@ TEST_F(CtrlChannelDhcpv4SrvTest, statusGet) { EXPECT_LE(found_reload->intValue(), 5); EXPECT_GE(found_reload->intValue(), 0); + auto found_multi_threading = arguments->get("multi-threading-enabled"); + ASSERT_TRUE(found_multi_threading); + EXPECT_EQ(false, found_multi_threading->boolValue()); + + auto found_thread_count = arguments->get("thread-pool-size"); + ASSERT_FALSE(found_thread_count); + + auto found_queue_size = arguments->get("packet-queue-size"); + ASSERT_FALSE(found_queue_size); + MultiThreadingMgr::instance().setMode(true); MultiThreadingMgr::instance().setThreadPoolSize(4); MultiThreadingMgr::instance().setPacketQueueSize(64); @@ -1153,11 +1163,15 @@ TEST_F(CtrlChannelDhcpv4SrvTest, statusGet) { EXPECT_LE(found_reload->intValue(), 5); EXPECT_GE(found_reload->intValue(), 0); - auto found_thread_count = arguments->get("thread-pool-size"); + found_multi_threading = arguments->get("multi-threading-enabled"); + ASSERT_TRUE(found_multi_threading); + EXPECT_EQ(true, found_multi_threading->boolValue()); + + found_thread_count = arguments->get("thread-pool-size"); ASSERT_TRUE(found_thread_count); EXPECT_EQ(found_thread_count->intValue(), 4); - auto found_queue_size = arguments->get("packet-queue-size"); + found_queue_size = arguments->get("packet-queue-size"); ASSERT_TRUE(found_queue_size); EXPECT_EQ(found_queue_size->intValue(), 64); } |