Browse Source

[2107] renamed exception-safety tests for ZoneDataTest with more comments.

hopefully the new name better represents the intent.
JINMEI Tatuya 12 years ago
parent
commit
44f92aeb78
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/lib/datasrc/memory/tests/zone_data_unittest.cc

+ 4 - 2
src/lib/datasrc/memory/tests/zone_data_unittest.cc

@@ -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