BIND 10 trac3052, updated. 508b40fdd135122a0e006524ac882794d28cfc9f [3052] Split D2QueueMgr constructor unit test into individual tests.
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Aug 5 17:12:16 UTC 2013
The branch, trac3052 has been updated
via 508b40fdd135122a0e006524ac882794d28cfc9f (commit)
from ce9289d1ef31525a60dccbe0daa72e8f8db1be63 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 508b40fdd135122a0e006524ac882794d28cfc9f
Author: Thomas Markwalder <tmark at isc.org>
Date: Mon Aug 5 13:10:57 2013 -0400
[3052] Split D2QueueMgr constructor unit test into individual tests.
-----------------------------------------------------------------------
Summary of changes:
src/bin/d2/tests/d2_queue_mgr_unittests.cc | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/d2/tests/d2_queue_mgr_unittests.cc b/src/bin/d2/tests/d2_queue_mgr_unittests.cc
index fd68b3a..bd5643e 100644
--- a/src/bin/d2/tests/d2_queue_mgr_unittests.cc
+++ b/src/bin/d2/tests/d2_queue_mgr_unittests.cc
@@ -76,25 +76,32 @@ const uint32_t LISTENER_PORT = 5301;
const uint32_t SENDER_PORT = LISTENER_PORT+1;
const long TEST_TIMEOUT = 5 * 1000;
-/// @brief Tests the D2QueueMgr constructors.
-/// This test verifies that:
-/// 1. Construction with max queue size of zero is not allowed
-/// 2. Default construction works and max queue size is defaulted properly
-/// 3. Construction with custom queue size works properly
-TEST(D2QueueMgrBasicTest, constructionTests) {
+/// @brief Tests that construction with max queue size of zero is not allowed.
+TEST(D2QueueMgrBasicTest, construction1) {
isc::asiolink::IOService io_service;
// Verify that constructing with max queue size of zero is not allowed.
EXPECT_THROW(D2QueueMgr(io_service, 0), D2QueueMgrError);
+}
+
+/// @brief Tests default construction works.
+TEST(D2QueueMgrBasicTest, construction2) {
+ isc::asiolink::IOService io_service;
// Verify that valid constructor works.
D2QueueMgrPtr queue_mgr;
- EXPECT_NO_THROW(queue_mgr.reset(new D2QueueMgr(io_service)));
+ ASSERT_NO_THROW(queue_mgr.reset(new D2QueueMgr(io_service)));
// Verify queue max is defaulted correctly.
EXPECT_EQ(D2QueueMgr::MAX_QUEUE_DEFAULT, queue_mgr->getMaxQueueSize());
+}
+
+/// @brief Tests construction with custom queue size works properly
+TEST(D2QueueMgrBasicTest, construction3) {
+ isc::asiolink::IOService io_service;
// Verify that custom queue size constructor works.
- EXPECT_NO_THROW(queue_mgr.reset(new D2QueueMgr(io_service, 100)));
+ D2QueueMgrPtr queue_mgr;
+ ASSERT_NO_THROW(queue_mgr.reset(new D2QueueMgr(io_service, 100)));
// Verify queue max is the custom value.
EXPECT_EQ(100, queue_mgr->getMaxQueueSize());
}
@@ -106,7 +113,7 @@ TEST(D2QueueMgrBasicTest, constructionTests) {
/// 3. Attempting to dequeue an empty queue is not allowed
/// 4. Peek returns the first entry on the queue without altering queue content
/// 5. Dequeue removes the first entry on the queue
-TEST(D2QueueMgrBasicTest, basicQueueTests) {
+TEST(D2QueueMgrBasicTest, basicQueue) {
isc::asiolink::IOService io_service;
// Construct the manager with max queue size set to number of messages
More information about the bind10-changes
mailing list