BIND 10 trac2836, updated. f0229b977d354a137df49137655eb3ec56d96f97 [2836] Clarify comment of test.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon May 13 12:56:43 UTC 2013


The branch, trac2836 has been updated
       via  f0229b977d354a137df49137655eb3ec56d96f97 (commit)
       via  2cab68004571463fdaeefe5659380fbbf9c54e01 (commit)
      from  807f3b5cd6b5f7daed92413e9ab771ec500b6536 (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 f0229b977d354a137df49137655eb3ec56d96f97
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon May 13 14:52:42 2013 +0200

    [2836] Clarify comment of test.

commit 2cab68004571463fdaeefe5659380fbbf9c54e01
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon May 13 14:45:17 2013 +0200

    [2836] The updater is never NULL in destructor
    
    So remove the condition to check it. Keep an assert there, just in case
    there was a reason originally, so we know about it.

-----------------------------------------------------------------------

Summary of changes:
 .../tests/memory/zone_data_updater_unittest.cc     |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc b/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc
index 7bb856b..46a671b 100644
--- a/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc
@@ -81,12 +81,11 @@ protected:
     }
 
     ~ZoneDataUpdaterTest() {
-        if (updater_) {
-            ZoneData::destroy(*mem_sgmt_, getZoneData(), zclass_);
-            // Release the updater, so it frees all memory inside the segment too
-            updater_.reset();
-            mem_sgmt_->clearNamedAddress("Test zone data");
-        }
+        assert(updater_);
+        ZoneData::destroy(*mem_sgmt_, getZoneData(), zclass_);
+        // Release the updater, so it frees all memory inside the segment too
+        updater_.reset();
+        mem_sgmt_->clearNamedAddress("Test zone data");
         if (!mem_sgmt_->allMemoryDeallocated()) {
             ADD_FAILURE() << "Memory leak detected";
         }
@@ -309,7 +308,8 @@ TEST_P(ZoneDataUpdaterTest, rrsigForNSEC3Only) {
 // Generate many small RRsets. This tests that the underlying memory segment
 // can grow during the execution and that the updater handles that well.
 //
-// Some of the grows will happen inserting the RRSIG, some with the TXT.
+// Some of the grows will happen inserting the RRSIG, some with the TXT. Or,
+// at least we hope so.
 TEST_P(ZoneDataUpdaterTest, manySmallRRsets) {
     for (size_t i = 0; i < 32768; ++i) {
         const std::string name(boost::lexical_cast<std::string>(i) +



More information about the bind10-changes mailing list