]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2107] renamed exception-safety tests for ZoneDataTest with more comments.
authorJINMEI Tatuya <jinmei@isc.org>
Tue, 28 Aug 2012 21:34:20 +0000 (14:34 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Tue, 28 Aug 2012 21:34:20 +0000 (14:34 -0700)
hopefully the new name better represents the intent.

src/lib/datasrc/memory/tests/zone_data_unittest.cc

index c81801cf10bad4e941233c04ddcf89084247245b..d361b346bc30a3f7c6f912bf0b5afc6754d25820 100644 (file)
@@ -150,10 +150,12 @@ TEST_F(ZoneDataTest, getOriginNode) {
     EXPECT_EQ(LabelSequence(zname_), zone_data_->getOriginNode()->getLabels());
 }
 
-TEST_F(ZoneDataTest, throwOnCreate) {
+TEST_F(ZoneDataTest, exceptionSafetyOnCreate) {
     // Note: below, we use our knowledge of how memory allocation happens
     // within the NSEC3Data, the zone data and the underlying domain tree
-    // implementation.
+    // implementation.  We'll emulate rare situations where allocate() fails
+    // with an exception, and confirm it doesn't cause any harsh disruption
+    // or leak.
 
     // Creating internal NSEC3 tree will succeed, but allocation of NSEC3Data
     // will fail due to bad_alloc.  It shouldn't cause memory leak