BIND 10 trac2108_3, updated. 753931a085b6df6b0e1e2a7a7530e3e8f6152459 [2108] Check RRsets returned by the iterator

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Sep 5 13:38:31 UTC 2012


The branch, trac2108_3 has been updated
       via  753931a085b6df6b0e1e2a7a7530e3e8f6152459 (commit)
       via  32c4d7fa5d90e76a0e81b12be856f83563f20039 (commit)
      from  ea0b94856e40284e6a91005963f26999c7c0d86c (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 753931a085b6df6b0e1e2a7a7530e3e8f6152459
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Sep 5 19:08:11 2012 +0530

    [2108] Check RRsets returned by the iterator

commit 32c4d7fa5d90e76a0e81b12be856f83563f20039
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Sep 5 19:07:54 2012 +0530

    [2108] Move iterator.h include to the header file

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

Summary of changes:
 src/lib/datasrc/memory/memory_client.cc            |    1 -
 src/lib/datasrc/memory/memory_client.h             |    5 +++--
 .../datasrc/memory/tests/memory_client_unittest.cc |    8 ++++++++
 3 files changed, 11 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/memory_client.cc b/src/lib/datasrc/memory/memory_client.cc
index 39b7f13..ef59f7f 100644
--- a/src/lib/datasrc/memory/memory_client.cc
+++ b/src/lib/datasrc/memory/memory_client.cc
@@ -25,7 +25,6 @@
 
 #include <util/memory_segment_local.h>
 
-#include <datasrc/iterator.h>
 #include <datasrc/data_source.h>
 #include <datasrc/factory.h>
 #include <datasrc/result.h>
diff --git a/src/lib/datasrc/memory/memory_client.h b/src/lib/datasrc/memory/memory_client.h
index 68d8a18..a965f5e 100644
--- a/src/lib/datasrc/memory/memory_client.h
+++ b/src/lib/datasrc/memory/memory_client.h
@@ -15,6 +15,7 @@
 #ifndef DATASRC_MEMORY_CLIENT_H
 #define DATASRC_MEMORY_CLIENT_H 1
 
+#include <datasrc/iterator.h>
 #include <datasrc/client.h>
 #include <datasrc/memory/zone_table.h>
 
@@ -205,8 +206,8 @@ public:
     findZone(const isc::dns::Name& name) const;
 
     /// \brief Implementation of the getIterator method
-    virtual ZoneIteratorPtr getIterator(const isc::dns::Name& name,
-                                        bool separate_rrs = false) const;
+    virtual isc::datasrc::ZoneIteratorPtr
+    getIterator(const isc::dns::Name& name, bool separate_rrs = false) const;
 
     /// In-memory data source doesn't write back peristently, so this
     /// derived method will result in a NotImplemented exception.
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index a3ee38b..b659532 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -88,6 +88,14 @@ TEST_F(MemoryClientTest, getIteratorForNonExistentZone) {
 TEST_F(MemoryClientTest, getIterator) {
     client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-empty.zone");
     ZoneIteratorPtr iterator(client_->getIterator(Name("example.org")));
+
+    // First we have the SOA
+    ConstRRsetPtr rrset_soa(iterator->getNextRRset());
+    EXPECT_TRUE(rrset_soa);
+    EXPECT_EQ(RRType::SOA(), rrset_soa->getType());
+
+    // There's nothing else in this zone
+    EXPECT_EQ(ConstRRsetPtr(), iterator->getNextRRset());
 }
 
 TEST_F(MemoryClientTest, getUpdaterThrowsNotImplemented) {



More information about the bind10-changes mailing list