BIND 10 trac2376-callbacks, updated. 86c78e9e9cf17caacb76918795849b4ea9941d41 [2376] Rename LoaderCallbacks to MasterLoaderCallbacks

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Nov 21 12:21:08 UTC 2012


The branch, trac2376-callbacks has been updated
       via  86c78e9e9cf17caacb76918795849b4ea9941d41 (commit)
       via  dc964cd262f9fb09d7e83b71bf5c5fbb0cb13578 (commit)
      from  996cf7be03981de06074a9cd6632c59936d01bad (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 86c78e9e9cf17caacb76918795849b4ea9941d41
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Nov 21 13:19:17 2012 +0100

    [2376] Rename LoaderCallbacks to MasterLoaderCallbacks
    
    And few other similar renames.

commit dc964cd262f9fb09d7e83b71bf5c5fbb0cb13578
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Nov 21 13:10:06 2012 +0100

    [2376] Rename loader_callbacks to master_loader_callbacks

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

Summary of changes:
 src/lib/datasrc/Makefile.am                        |    3 +-
 ...der_callbacks.cc => master_loader_callbacks.cc} |   38 +++++++++--------
 ...oader_callbacks.h => master_loader_callbacks.h} |   12 +++---
 src/lib/datasrc/tests/Makefile.am                  |    2 +-
 ...cks_test.cc => master_loader_callbacks_test.cc} |   25 ++++++------
 src/lib/dns/Makefile.am                            |    2 +-
 ...oader_callbacks.h => master_loader_callbacks.h} |   11 ++---
 src/lib/dns/tests/Makefile.am                      |    2 +-
 ...cks_test.cc => master_loader_callbacks_test.cc} |   43 ++++++++++----------
 9 files changed, 72 insertions(+), 66 deletions(-)
 rename src/lib/datasrc/{loader_callbacks.cc => master_loader_callbacks.cc} (53%)
 rename src/lib/datasrc/{loader_callbacks.h => master_loader_callbacks.h} (85%)
 rename src/lib/datasrc/tests/{loader_callbacks_test.cc => master_loader_callbacks_test.cc} (86%)
 rename src/lib/dns/{loader_callbacks.h => master_loader_callbacks.h} (94%)
 rename src/lib/dns/tests/{loader_callbacks_test.cc => master_loader_callbacks_test.cc} (63%)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/Makefile.am b/src/lib/datasrc/Makefile.am
index 53ffd06..dcf774e 100644
--- a/src/lib/datasrc/Makefile.am
+++ b/src/lib/datasrc/Makefile.am
@@ -35,7 +35,8 @@ libb10_datasrc_la_SOURCES += database.h database.cc
 libb10_datasrc_la_SOURCES += factory.h factory.cc
 libb10_datasrc_la_SOURCES += client_list.h client_list.cc
 libb10_datasrc_la_SOURCES += memory_datasrc.h memory_datasrc.cc
-libb10_datasrc_la_SOURCES += loader_callbacks.h loader_callbacks.cc
+libb10_datasrc_la_SOURCES += master_loader_callbacks.h
+libb10_datasrc_la_SOURCES += master_loader_callbacks.cc
 nodist_libb10_datasrc_la_SOURCES = datasrc_messages.h datasrc_messages.cc
 libb10_datasrc_la_LDFLAGS = -no-undefined -version-info 1:0:1
 
diff --git a/src/lib/datasrc/loader_callbacks.cc b/src/lib/datasrc/loader_callbacks.cc
deleted file mode 100644
index 9759009..0000000
--- a/src/lib/datasrc/loader_callbacks.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#include <datasrc/loader_callbacks.h>
-#include <datasrc/zone.h>
-#include <datasrc/logger.h>
-
-#include <dns/name.h>
-#include <dns/rrclass.h>
-#include <dns/rrset.h>
-
-#include <string>
-#include <boost/bind.hpp>
-
-namespace isc {
-namespace datasrc {
-
-namespace {
-
-void
-logError(const isc::dns::Name& name, const isc::dns::RRClass& rrclass,
-         bool* ok, const std::string& source, size_t line,
-         const std::string& reason)
-{
-    LOG_ERROR(logger, DATASRC_MASTER_LOAD_ERROR).arg(source).arg(line).
-        arg(name).arg(rrclass).arg(reason);
-    if (ok != NULL) {
-        *ok = false;
-    }
-}
-
-void
-logWarning(const isc::dns::Name& name, const isc::dns::RRClass& rrclass,
-         const std::string& source, size_t line, const std::string& reason)
-{
-    LOG_WARN(logger, DATASRC_MASTER_LOAD_WARN).arg(source).arg(line).
-        arg(name).arg(rrclass).arg(reason);
-}
-
-}
-
-isc::dns::LoaderCallbacks
-createCallbacks(ZoneUpdater& updater, const isc::dns::Name& name,
-                const isc::dns::RRClass& rrclass, bool* ok)
-{
-    return (isc::dns::LoaderCallbacks(boost::bind(&logError, name, rrclass, ok,
-                                                  _1, _2, _3),
-                                      boost::bind(&logWarning, name, rrclass,
-                                                  _1, _2, _3),
-                                      boost::bind(&ZoneUpdater::addRRset,
-                                                  &updater,
-                                                  // The callback provides a
-                                                  // shared pointer, we need
-                                                  // the object. This bind
-                                                  // unpacks the object.
-                                                  boost::bind(&isc::dns::
-                                                              RRsetPtr::
-                                                              operator*,
-                                                              _1))));
-}
-
-}
-}
diff --git a/src/lib/datasrc/loader_callbacks.h b/src/lib/datasrc/loader_callbacks.h
deleted file mode 100644
index 0f074e8..0000000
--- a/src/lib/datasrc/loader_callbacks.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#ifndef DATASRC_LOADER_CALLBACKS_H
-#define DATASRC_LOADER_CALLBACKS_H
-
-#include <dns/loader_callbacks.h>
-
-namespace isc {
-namespace datasrc {
-
-class ZoneUpdater;
-
-/// \brief Create callbacks to fill loaded zone into updater.
-///
-/// This will create set of callbacks for the MasterLoader that
-/// will fill the loaded rrsets into a zone updater. If any issues
-/// are found, it logs them. If any of the issues are errors and
-/// the ok parameter is non-NULL, it is set to false.
-///
-/// \param updater The zone updater used as the destination for the
-///     RRsets. It should be opened in the replace mode and should
-///     be clean (no changes done to it). It is not commited
-///     automatically and it is up to the caller to commit (or not)
-///     when the loading is done.
-/// \param name Name of the zone. Used in logging.
-/// \param rrclass The class of the zone. Used in logging.
-/// \param ok If this is non-NULL and there are any errors during
-///     the loading, it is set to false. Otherwise, it is untouched.
-/// \return Set of callbacks to be passed to the master loader.
-/// \throw std::bad_alloc when allocation fails.
-isc::dns::LoaderCallbacks
-createCallbacks(ZoneUpdater& updater, const isc::dns::Name& name,
-                const isc::dns::RRClass& rrclass, bool* ok);
-
-}
-}
-
-#endif
diff --git a/src/lib/datasrc/master_loader_callbacks.cc b/src/lib/datasrc/master_loader_callbacks.cc
new file mode 100644
index 0000000..c6bb6f1
--- /dev/null
+++ b/src/lib/datasrc/master_loader_callbacks.cc
@@ -0,0 +1,76 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#include <datasrc/master_loader_callbacks.h>
+#include <datasrc/zone.h>
+#include <datasrc/logger.h>
+
+#include <dns/name.h>
+#include <dns/rrclass.h>
+#include <dns/rrset.h>
+
+#include <string>
+#include <boost/bind.hpp>
+
+namespace isc {
+namespace datasrc {
+
+namespace {
+
+void
+logError(const isc::dns::Name& name, const isc::dns::RRClass& rrclass,
+         bool* ok, const std::string& source, size_t line,
+         const std::string& reason)
+{
+    LOG_ERROR(logger, DATASRC_MASTER_LOAD_ERROR).arg(source).arg(line).
+        arg(name).arg(rrclass).arg(reason);
+    if (ok != NULL) {
+        *ok = false;
+    }
+}
+
+void
+logWarning(const isc::dns::Name& name, const isc::dns::RRClass& rrclass,
+         const std::string& source, size_t line, const std::string& reason)
+{
+    LOG_WARN(logger, DATASRC_MASTER_LOAD_WARN).arg(source).arg(line).
+        arg(name).arg(rrclass).arg(reason);
+}
+
+}
+
+isc::dns::MasterLoaderCallbacks
+createMasterLoaderCallbacks(ZoneUpdater& updater, const isc::dns::Name& name,
+                            const isc::dns::RRClass& rrclass, bool* ok)
+{
+    return (isc::dns::MasterLoaderCallbacks(boost::bind(&logError, name,
+                                                        rrclass, ok, _1, _2,
+                                                        _3),
+                                            boost::bind(&logWarning, name,
+                                                        rrclass, _1, _2, _3),
+                                            boost::bind(&ZoneUpdater::addRRset,
+                                                        &updater,
+                                                        // The callback provides
+                                                        // a shared pointer, we
+                                                        // need the object. This
+                                                        // bind unpacks the
+                                                        // object.
+                                                        boost::bind(&isc::dns::
+                                                                    RRsetPtr::
+                                                                    operator*,
+                                                                    _1))));
+}
+
+}
+}
diff --git a/src/lib/datasrc/master_loader_callbacks.h b/src/lib/datasrc/master_loader_callbacks.h
new file mode 100644
index 0000000..a592319
--- /dev/null
+++ b/src/lib/datasrc/master_loader_callbacks.h
@@ -0,0 +1,50 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#ifndef DATASRC_MASTER_LOADER_CALLBACKS_H
+#define DATASRC_MASTER_LOADER_CALLBACKS_H
+
+#include <dns/master_loader_callbacks.h>
+
+namespace isc {
+namespace datasrc {
+
+class ZoneUpdater;
+
+/// \brief Create callbacks to fill loaded zone into updater.
+///
+/// This will create set of callbacks for the MasterLoader that
+/// will fill the loaded rrsets into a zone updater. If any issues
+/// are found, it logs them. If any of the issues are errors and
+/// the ok parameter is non-NULL, it is set to false.
+///
+/// \param updater The zone updater used as the destination for the
+///     RRsets. It should be opened in the replace mode and should
+///     be clean (no changes done to it). It is not commited
+///     automatically and it is up to the caller to commit (or not)
+///     when the loading is done.
+/// \param name Name of the zone. Used in logging.
+/// \param rrclass The class of the zone. Used in logging.
+/// \param ok If this is non-NULL and there are any errors during
+///     the loading, it is set to false. Otherwise, it is untouched.
+/// \return Set of callbacks to be passed to the master loader.
+/// \throw std::bad_alloc when allocation fails.
+isc::dns::MasterLoaderCallbacks
+createMasterLoaderCallbacks(ZoneUpdater& updater, const isc::dns::Name& name,
+                            const isc::dns::RRClass& rrclass, bool* ok);
+
+}
+}
+
+#endif
diff --git a/src/lib/datasrc/tests/Makefile.am b/src/lib/datasrc/tests/Makefile.am
index c265f2e..7cdf0ee 100644
--- a/src/lib/datasrc/tests/Makefile.am
+++ b/src/lib/datasrc/tests/Makefile.am
@@ -59,7 +59,7 @@ run_unittests_SOURCES += zonetable_unittest.cc
 run_unittests_SOURCES += zone_finder_context_unittest.cc
 run_unittests_SOURCES += faked_nsec3.h faked_nsec3.cc
 run_unittests_SOURCES += client_list_unittest.cc
-run_unittests_SOURCES += loader_callbacks_test.cc
+run_unittests_SOURCES += master_loader_callbacks_test.cc
 
 # We need the actual module implementation in the tests (they are not part
 # of libdatasrc)
diff --git a/src/lib/datasrc/tests/loader_callbacks_test.cc b/src/lib/datasrc/tests/loader_callbacks_test.cc
deleted file mode 100644
index 28377b9..0000000
--- a/src/lib/datasrc/tests/loader_callbacks_test.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#include <datasrc/loader_callbacks.h>
-#include <datasrc/zone.h>
-
-#include <dns/rrset.h>
-#include <dns/rrclass.h>
-#include <dns/rrttl.h>
-
-#include <exceptions/exceptions.h>
-
-#include <gtest/gtest.h>
-
-#include <boost/lexical_cast.hpp>
-
-#include <list>
-#include <string>
-
-using namespace isc::datasrc;
-
-namespace {
-
-// An updater for the tests. Most of the virtual methods throw
-// NotImplemented, as they are not used in the tests.
-class MockUpdater : public ZoneUpdater {
-public:
-    // We do the adding in this test. We currently only check these are
-    // the correct ones, according to a predefined set in a list.
-    virtual void addRRset(const isc::dns::AbstractRRset& rrset) {
-        ASSERT_FALSE(expected_rrsets_.empty());
-        // In our tests, pointer equality is enough.
-        EXPECT_EQ(expected_rrsets_.front().get(), &rrset);
-        // And remove this RRset, as it has been used.
-        expected_rrsets_.pop_front();
-    }
-    // The unused but required methods
-    virtual ZoneFinder& getFinder() {
-        isc_throw(isc::NotImplemented, "Not to be called in this test");
-    }
-    virtual void deleteRRset(const isc::dns::AbstractRRset&) {
-        isc_throw(isc::NotImplemented, "Not to be called in this test");
-    }
-    virtual void commit() {
-        isc_throw(isc::NotImplemented, "Not to be called in this test");
-    }
-    // The RRsets that are expected to appear through addRRset.
-    std::list<isc::dns::RRsetPtr> expected_rrsets_;
-};
-
-class LoaderCallbackTest : public ::testing::Test {
-protected:
-    LoaderCallbackTest() :
-        ok_(true),
-        callbacks_(createCallbacks(updater_, isc::dns::Name("example.org"),
-                                   isc::dns::RRClass::IN(), &ok_))
-    {}
-    // Generate a new RRset, put it to the updater and return it.
-    isc::dns::RRsetPtr generateRRset() {
-        const isc::dns::RRsetPtr
-            result(new isc::dns::RRset(isc::dns::Name("example.org"),
-                                       isc::dns::RRClass::IN(),
-                                       isc::dns::RRType::A(),
-                                       isc::dns::RRTTL(3600)));
-        updater_.expected_rrsets_.push_back(result);
-        return (result);
-    }
-    // An updater to be passed to the context
-    MockUpdater updater_;
-    // Is the loading OK?
-    bool ok_;
-    // The tested context
-    isc::dns::LoaderCallbacks callbacks_;
-};
-
-// Check it doesn't crash if we don't provide the OK
-TEST_F(LoaderCallbackTest, noOkProvided) {
-    createCallbacks(updater_, isc::dns::Name("example.org"),
-                    isc::dns::RRClass::IN(), NULL).error("No source", 1,
-                                                         "No reason");
-}
-
-// Check the callbacks can be called, don't crash and the error one switches
-// to non-OK mode. This, however, does not stop anybody from calling more
-// callbacks.
-TEST_F(LoaderCallbackTest, callbacks) {
-    EXPECT_NO_THROW(callbacks_.warning("No source", 1, "Just for fun"));
-    // The warning does not hurt the OK mode.
-    EXPECT_TRUE(ok_);
-    // Now the error
-    EXPECT_NO_THROW(callbacks_.error("No source", 2, "Some error"));
-    // The OK is turned off once there's at least one error
-    EXPECT_FALSE(ok_);
-
-    // Not being OK does not hurt that much, we can still call the callbacks
-    EXPECT_NO_THROW(callbacks_.warning("No source", 3, "Just for fun"));
-    // The OK is not reset back to true
-    EXPECT_FALSE(ok_);
-    EXPECT_NO_THROW(callbacks_.error("No source", 4, "Some error"));
-}
-
-// Try adding some RRsets.
-TEST_F(LoaderCallbackTest, addRRset) {
-    // Put some of them in.
-    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
-    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
-    // They all get pushed there right away, so there are none in the queue
-    EXPECT_TRUE(updater_.expected_rrsets_.empty());
-
-    // Making the status not OK by an error does not stop the RRsets to get
-    // through.
-    callbacks_.error("No source", 1, "Just an error");
-    EXPECT_FALSE(ok_);
-
-    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
-    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
-    // They got through and the OK status didn't get reset
-    EXPECT_TRUE(updater_.expected_rrsets_.empty());
-    EXPECT_FALSE(ok_);
-}
-
-}
diff --git a/src/lib/datasrc/tests/master_loader_callbacks_test.cc b/src/lib/datasrc/tests/master_loader_callbacks_test.cc
new file mode 100644
index 0000000..6f62543
--- /dev/null
+++ b/src/lib/datasrc/tests/master_loader_callbacks_test.cc
@@ -0,0 +1,134 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#include <datasrc/master_loader_callbacks.h>
+#include <datasrc/zone.h>
+
+#include <dns/rrset.h>
+#include <dns/rrclass.h>
+#include <dns/rrttl.h>
+
+#include <exceptions/exceptions.h>
+
+#include <gtest/gtest.h>
+
+#include <boost/lexical_cast.hpp>
+
+#include <list>
+#include <string>
+
+using namespace isc::datasrc;
+
+namespace {
+
+// An updater for the tests. Most of the virtual methods throw
+// NotImplemented, as they are not used in the tests.
+class MockUpdater : public ZoneUpdater {
+public:
+    // We do the adding in this test. We currently only check these are
+    // the correct ones, according to a predefined set in a list.
+    virtual void addRRset(const isc::dns::AbstractRRset& rrset) {
+        ASSERT_FALSE(expected_rrsets_.empty());
+        // In our tests, pointer equality is enough.
+        EXPECT_EQ(expected_rrsets_.front().get(), &rrset);
+        // And remove this RRset, as it has been used.
+        expected_rrsets_.pop_front();
+    }
+    // The unused but required methods
+    virtual ZoneFinder& getFinder() {
+        isc_throw(isc::NotImplemented, "Not to be called in this test");
+    }
+    virtual void deleteRRset(const isc::dns::AbstractRRset&) {
+        isc_throw(isc::NotImplemented, "Not to be called in this test");
+    }
+    virtual void commit() {
+        isc_throw(isc::NotImplemented, "Not to be called in this test");
+    }
+    // The RRsets that are expected to appear through addRRset.
+    std::list<isc::dns::RRsetPtr> expected_rrsets_;
+};
+
+class MasterLoaderCallbackTest : public ::testing::Test {
+protected:
+    MasterLoaderCallbackTest() :
+        ok_(true),
+        callbacks_(createMasterLoaderCallbacks(updater_,
+                                               isc::dns::Name("example.org"),
+                                               isc::dns::RRClass::IN(), &ok_))
+    {}
+    // Generate a new RRset, put it to the updater and return it.
+    isc::dns::RRsetPtr generateRRset() {
+        const isc::dns::RRsetPtr
+            result(new isc::dns::RRset(isc::dns::Name("example.org"),
+                                       isc::dns::RRClass::IN(),
+                                       isc::dns::RRType::A(),
+                                       isc::dns::RRTTL(3600)));
+        updater_.expected_rrsets_.push_back(result);
+        return (result);
+    }
+    // An updater to be passed to the context
+    MockUpdater updater_;
+    // Is the loading OK?
+    bool ok_;
+    // The tested context
+    isc::dns::MasterLoaderCallbacks callbacks_;
+};
+
+// Check it doesn't crash if we don't provide the OK
+TEST_F(MasterLoaderCallbackTest, noOkProvided) {
+    createMasterLoaderCallbacks(updater_, isc::dns::Name("example.org"),
+                                isc::dns::RRClass::IN(), NULL).
+        error("No source", 1, "No reason");
+}
+
+// Check the callbacks can be called, don't crash and the error one switches
+// to non-OK mode. This, however, does not stop anybody from calling more
+// callbacks.
+TEST_F(MasterLoaderCallbackTest, callbacks) {
+    EXPECT_NO_THROW(callbacks_.warning("No source", 1, "Just for fun"));
+    // The warning does not hurt the OK mode.
+    EXPECT_TRUE(ok_);
+    // Now the error
+    EXPECT_NO_THROW(callbacks_.error("No source", 2, "Some error"));
+    // The OK is turned off once there's at least one error
+    EXPECT_FALSE(ok_);
+
+    // Not being OK does not hurt that much, we can still call the callbacks
+    EXPECT_NO_THROW(callbacks_.warning("No source", 3, "Just for fun"));
+    // The OK is not reset back to true
+    EXPECT_FALSE(ok_);
+    EXPECT_NO_THROW(callbacks_.error("No source", 4, "Some error"));
+}
+
+// Try adding some RRsets.
+TEST_F(MasterLoaderCallbackTest, addRRset) {
+    // Put some of them in.
+    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
+    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
+    // They all get pushed there right away, so there are none in the queue
+    EXPECT_TRUE(updater_.expected_rrsets_.empty());
+
+    // Making the status not OK by an error does not stop the RRsets to get
+    // through.
+    callbacks_.error("No source", 1, "Just an error");
+    EXPECT_FALSE(ok_);
+
+    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
+    EXPECT_NO_THROW(callbacks_.addRRset(generateRRset()));
+    // They got through and the OK status didn't get reset
+    EXPECT_TRUE(updater_.expected_rrsets_.empty());
+    EXPECT_FALSE(ok_);
+}
+
+}
diff --git a/src/lib/dns/Makefile.am b/src/lib/dns/Makefile.am
index 4d7cadf..c101d77 100644
--- a/src/lib/dns/Makefile.am
+++ b/src/lib/dns/Makefile.am
@@ -119,7 +119,7 @@ libb10_dns___la_SOURCES += tsigerror.h tsigerror.cc
 libb10_dns___la_SOURCES += tsigkey.h tsigkey.cc
 libb10_dns___la_SOURCES += tsigrecord.h tsigrecord.cc
 libb10_dns___la_SOURCES += character_string.h character_string.cc
-libb10_dns___la_SOURCES += loader_callbacks.h
+libb10_dns___la_SOURCES += master_loader_callbacks.h
 libb10_dns___la_SOURCES += rdata/generic/detail/nsec_bitmap.h
 libb10_dns___la_SOURCES += rdata/generic/detail/nsec_bitmap.cc
 libb10_dns___la_SOURCES += rdata/generic/detail/nsec3param_common.cc
diff --git a/src/lib/dns/loader_callbacks.h b/src/lib/dns/loader_callbacks.h
deleted file mode 100644
index 93743c2..0000000
--- a/src/lib/dns/loader_callbacks.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#ifndef LOADER_CALLBACKS_H
-#define LOADER_CALLBACKS_H
-
-#include <dns/rrset.h>
-
-#include <exceptions/exceptions.h>
-
-#include <string>
-#include <boost/function.hpp>
-
-namespace isc {
-namespace dns {
-
-/// \brief Set of callbacks for a loader.
-///
-/// This holds a set of callbacks by which a loader (such as MasterLoader)
-/// can report loaded RRsets, errors and other unusual conditions.
-///
-/// All the callbacks must be set.
-class LoaderCallbacks {
-public:
-    /// \brief Type of one callback to report problems.
-    ///
-    /// This is the type of one callback used to report an unusual
-    /// condition or error.
-    ///
-    /// \param source_name The name of the source where the problem happened.
-    ///     This is usually a file name.
-    /// \param source_line Position of the problem, counted in lines from the
-    ///     beginning of the source.
-    /// \param reason Human readable description of what happened.
-    typedef boost::function<void(const std::string& source_name,
-                                 size_t source_line,
-                                 const std::string& reason)> IssueCallback;
-
-    /// \brief Type of callback to add a RRset.
-    ///
-    /// This type of callback is used by the loader to report another loaded
-    /// RRset. The RRset is no longer preserved by the loader and is fully
-    /// owned by the callback.
-    ///
-    /// \param RRset The rrset to add. It does not contain the accompanying
-    ///     RRSIG (if the zone is signed), they are reported with separate
-    ///     calls to the callback.
-    typedef boost::function<void(const RRsetPtr& rrset)> AddCallback;
-
-    /// \brief Constructor
-    ///
-    /// Initializes the callbacks.
-    ///
-    /// \param error The error callback to use.
-    /// \param warning The warning callback to use.
-    /// \param add The add callback to use.
-    /// \throw isc::InvalidParameter if any of the callbacks is empty.
-    LoaderCallbacks(const IssueCallback& error, const IssueCallback& warning,
-                    const AddCallback& add) :
-        error_(error),
-        warning_(warning),
-        add_(add)
-    {
-        if (error_.empty() || warning_.empty() || add_.empty()) {
-            isc_throw(isc::InvalidParameter,
-                      "Empty function passed as callback");
-        }
-    }
-
-    /// \brief Call callback for serious errors
-    ///
-    /// This is called whenever there's a serious problem which makes the data
-    /// being loaded unusable. Further processing may or may not happen after
-    /// this (for example to detect further errors), but the data should not
-    /// be used.
-    ///
-    /// It calls whatever was passed to the error parameter to the constructor.
-    ///
-    /// If the caller of the loader wants to abort, it is possible to throw
-    /// from the callback, which aborts the load.
-    void error(const std::string& source_name, size_t source_line,
-               const std::string& reason)
-    {
-        error_(source_name, source_line, reason);
-    }
-
-    /// \brief Call callback for potential problems
-    ///
-    /// This is called whenever a minor problem is discovered. This might mean
-    /// the data is completely OK, it just looks suspicious.
-    ///
-    /// It calls whatever was passed to the error parameter to the constructor.
-    ///
-    /// The loading will continue after the callback. If the caller wants to
-    /// abort (which is probably not a very good idea, since warnings
-    /// may be false positives), it is possible to throw from inside the
-    /// callback.
-    void warning(const std::string& source_name, size_t source_line,
-                 const std::string& reason)
-    {
-        warning_(source_name, source_line, reason);
-    }
-
-    /// \brief Call the add callback.
-    ///
-    /// This is called for each loaded RRset.
-    void addRRset(const RRsetPtr& rrset) {
-        add_(rrset);
-    }
-
-private:
-    IssueCallback error_, warning_;
-    AddCallback add_;
-};
-
-}
-}
-
-#endif // LOADER_CALLBACKS_H
diff --git a/src/lib/dns/master_loader_callbacks.h b/src/lib/dns/master_loader_callbacks.h
new file mode 100644
index 0000000..4af8f54
--- /dev/null
+++ b/src/lib/dns/master_loader_callbacks.h
@@ -0,0 +1,131 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#ifndef MASTER_LOADER_CALLBACKS_H
+#define MASTER_LOADER_CALLBACKS_H
+
+#include <dns/rrset.h>
+
+#include <exceptions/exceptions.h>
+
+#include <string>
+#include <boost/function.hpp>
+
+namespace isc {
+namespace dns {
+
+/// \brief Set of callbacks for a loader.
+///
+/// This holds a set of callbacks by which a loader (such as MasterLoader)
+/// can report loaded RRsets, errors and other unusual conditions.
+///
+/// All the callbacks must be set.
+class MasterLoaderCallbacks {
+public:
+    /// \brief Type of one callback to report problems.
+    ///
+    /// This is the type of one callback used to report an unusual
+    /// condition or error.
+    ///
+    /// \param source_name The name of the source where the problem happened.
+    ///     This is usually a file name.
+    /// \param source_line Position of the problem, counted in lines from the
+    ///     beginning of the source.
+    /// \param reason Human readable description of what happened.
+    typedef boost::function<void(const std::string& source_name,
+                                 size_t source_line,
+                                 const std::string& reason)> IssueCallback;
+
+    /// \brief Type of callback to add a RRset.
+    ///
+    /// This type of callback is used by the loader to report another loaded
+    /// RRset. The RRset is no longer preserved by the loader and is fully
+    /// owned by the callback.
+    ///
+    /// \param RRset The rrset to add. It does not contain the accompanying
+    ///     RRSIG (if the zone is signed), they are reported with separate
+    ///     calls to the callback.
+    typedef boost::function<void(const RRsetPtr& rrset)> AddCallback;
+
+    /// \brief Constructor
+    ///
+    /// Initializes the callbacks.
+    ///
+    /// \param error The error callback to use.
+    /// \param warning The warning callback to use.
+    /// \param add The add callback to use.
+    /// \throw isc::InvalidParameter if any of the callbacks is empty.
+    MasterLoaderCallbacks(const IssueCallback& error,
+                          const IssueCallback& warning,
+                          const AddCallback& add) :
+        error_(error),
+        warning_(warning),
+        add_(add)
+    {
+        if (error_.empty() || warning_.empty() || add_.empty()) {
+            isc_throw(isc::InvalidParameter,
+                      "Empty function passed as callback");
+        }
+    }
+
+    /// \brief Call callback for serious errors
+    ///
+    /// This is called whenever there's a serious problem which makes the data
+    /// being loaded unusable. Further processing may or may not happen after
+    /// this (for example to detect further errors), but the data should not
+    /// be used.
+    ///
+    /// It calls whatever was passed to the error parameter to the constructor.
+    ///
+    /// If the caller of the loader wants to abort, it is possible to throw
+    /// from the callback, which aborts the load.
+    void error(const std::string& source_name, size_t source_line,
+               const std::string& reason)
+    {
+        error_(source_name, source_line, reason);
+    }
+
+    /// \brief Call callback for potential problems
+    ///
+    /// This is called whenever a minor problem is discovered. This might mean
+    /// the data is completely OK, it just looks suspicious.
+    ///
+    /// It calls whatever was passed to the error parameter to the constructor.
+    ///
+    /// The loading will continue after the callback. If the caller wants to
+    /// abort (which is probably not a very good idea, since warnings
+    /// may be false positives), it is possible to throw from inside the
+    /// callback.
+    void warning(const std::string& source_name, size_t source_line,
+                 const std::string& reason)
+    {
+        warning_(source_name, source_line, reason);
+    }
+
+    /// \brief Call the add callback.
+    ///
+    /// This is called for each loaded RRset.
+    void addRRset(const RRsetPtr& rrset) {
+        add_(rrset);
+    }
+
+private:
+    IssueCallback error_, warning_;
+    AddCallback add_;
+};
+
+}
+}
+
+#endif // LOADER_CALLBACKS_H
diff --git a/src/lib/dns/tests/Makefile.am b/src/lib/dns/tests/Makefile.am
index e88d060..12f8f2f 100644
--- a/src/lib/dns/tests/Makefile.am
+++ b/src/lib/dns/tests/Makefile.am
@@ -71,7 +71,7 @@ run_unittests_SOURCES += tsigerror_unittest.cc
 run_unittests_SOURCES += tsigkey_unittest.cc
 run_unittests_SOURCES += tsigrecord_unittest.cc
 run_unittests_SOURCES += character_string_unittest.cc
-run_unittests_SOURCES += loader_callbacks_test.cc
+run_unittests_SOURCES += master_loader_callbacks_test.cc
 run_unittests_SOURCES += run_unittests.cc
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 # We shouldn't need to include BOTAN_LIBS here, but there
diff --git a/src/lib/dns/tests/loader_callbacks_test.cc b/src/lib/dns/tests/loader_callbacks_test.cc
deleted file mode 100644
index f2686d0..0000000
--- a/src/lib/dns/tests/loader_callbacks_test.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#include <dns/loader_callbacks.h>
-#include <dns/name.h>
-#include <dns/rrttl.h>
-#include <dns/rrclass.h>
-
-#include <exceptions/exceptions.h>
-
-#include <gtest/gtest.h>
-#include <boost/bind.hpp>
-
-namespace {
-
-using std::string;
-using namespace isc::dns;
-
-class LoaderCallbacksTest : public ::testing::Test {
-protected:
-    LoaderCallbacksTest() :
-        issue_called_(false),
-        add_called_(false),
-        rrset_(new RRset(Name("example.org"), RRClass::IN(), RRType::A(),
-                         RRTTL(3600))),
-        error_(boost::bind(&LoaderCallbacksTest::checkCallback, this, true, _1,
-                           _2, _3)),
-        warning_(boost::bind(&LoaderCallbacksTest::checkCallback, this, false,
-                             _1, _2, _3)),
-        add_(boost::bind(&LoaderCallbacksTest::checkAdd, this, _1)),
-        callbacks_(error_, warning_, add_)
-    {}
-
-    void checkCallback(bool error, const string& source, size_t line,
-                       const string& reason)
-    {
-        issue_called_ = true;
-        last_was_error_ = error;
-        EXPECT_EQ("source", source);
-        EXPECT_EQ(1, line);
-        EXPECT_EQ("reason", reason);
-    }
-    void checkAdd(const RRsetPtr& rrset) {
-        add_called_ = true;
-        EXPECT_EQ(rrset_, rrset);
-    }
-    bool last_was_error_;
-    bool issue_called_, add_called_;
-    const RRsetPtr rrset_;
-    const LoaderCallbacks::IssueCallback error_, warning_;
-    const LoaderCallbacks::AddCallback add_;
-    LoaderCallbacks callbacks_;
-};
-
-// Check the constructor rejects empty callbacks, but accepts non-empty ones
-TEST_F(LoaderCallbacksTest, constructor) {
-    EXPECT_THROW(LoaderCallbacks(LoaderCallbacks::IssueCallback(), warning_,
-                                 add_), isc::InvalidParameter);
-    EXPECT_THROW(LoaderCallbacks(error_, LoaderCallbacks::IssueCallback(),
-                                 add_), isc::InvalidParameter);
-    EXPECT_THROW(LoaderCallbacks(error_, warning_,
-                                 LoaderCallbacks::AddCallback()),
-                 isc::InvalidParameter);
-    EXPECT_NO_THROW(LoaderCallbacks(error_, warning_, add_));
-}
-
-// Call the issue callbacks
-TEST_F(LoaderCallbacksTest, issueCall) {
-    callbacks_.error("source", 1, "reason");
-    EXPECT_TRUE(last_was_error_);
-    EXPECT_TRUE(issue_called_);
-
-    issue_called_ = false;
-
-    callbacks_.warning("source", 1, "reason");
-    EXPECT_FALSE(last_was_error_);
-    EXPECT_TRUE(issue_called_);
-}
-
-// Call the add callback
-TEST_F(LoaderCallbacksTest, addCall) {
-    EXPECT_FALSE(issue_called_);
-    callbacks_.addRRset(rrset_);
-    EXPECT_TRUE(add_called_);
-}
-
-
-}
diff --git a/src/lib/dns/tests/master_loader_callbacks_test.cc b/src/lib/dns/tests/master_loader_callbacks_test.cc
new file mode 100644
index 0000000..b93c87e
--- /dev/null
+++ b/src/lib/dns/tests/master_loader_callbacks_test.cc
@@ -0,0 +1,100 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#include <dns/master_loader_callbacks.h>
+#include <dns/name.h>
+#include <dns/rrttl.h>
+#include <dns/rrclass.h>
+
+#include <exceptions/exceptions.h>
+
+#include <gtest/gtest.h>
+#include <boost/bind.hpp>
+
+namespace {
+
+using std::string;
+using namespace isc::dns;
+
+class MasterLoaderCallbacksTest : public ::testing::Test {
+protected:
+    MasterLoaderCallbacksTest() :
+        issue_called_(false),
+        add_called_(false),
+        rrset_(new RRset(Name("example.org"), RRClass::IN(), RRType::A(),
+                         RRTTL(3600))),
+        error_(boost::bind(&MasterLoaderCallbacksTest::checkCallback, this,
+                           true, _1, _2, _3)),
+        warning_(boost::bind(&MasterLoaderCallbacksTest::checkCallback, this,
+                             false, _1, _2, _3)),
+        add_(boost::bind(&MasterLoaderCallbacksTest::checkAdd, this, _1)),
+        callbacks_(error_, warning_, add_)
+    {}
+
+    void checkCallback(bool error, const string& source, size_t line,
+                       const string& reason)
+    {
+        issue_called_ = true;
+        last_was_error_ = error;
+        EXPECT_EQ("source", source);
+        EXPECT_EQ(1, line);
+        EXPECT_EQ("reason", reason);
+    }
+    void checkAdd(const RRsetPtr& rrset) {
+        add_called_ = true;
+        EXPECT_EQ(rrset_, rrset);
+    }
+    bool last_was_error_;
+    bool issue_called_, add_called_;
+    const RRsetPtr rrset_;
+    const MasterLoaderCallbacks::IssueCallback error_, warning_;
+    const MasterLoaderCallbacks::AddCallback add_;
+    MasterLoaderCallbacks callbacks_;
+};
+
+// Check the constructor rejects empty callbacks, but accepts non-empty ones
+TEST_F(MasterLoaderCallbacksTest, constructor) {
+    EXPECT_THROW(MasterLoaderCallbacks(MasterLoaderCallbacks::IssueCallback(),
+                                       warning_, add_), isc::InvalidParameter);
+    EXPECT_THROW(MasterLoaderCallbacks(error_,
+                                       MasterLoaderCallbacks::IssueCallback(),
+                                       add_), isc::InvalidParameter);
+    EXPECT_THROW(MasterLoaderCallbacks(error_, warning_,
+                                       MasterLoaderCallbacks::AddCallback()),
+                 isc::InvalidParameter);
+    EXPECT_NO_THROW(MasterLoaderCallbacks(error_, warning_, add_));
+}
+
+// Call the issue callbacks
+TEST_F(MasterLoaderCallbacksTest, issueCall) {
+    callbacks_.error("source", 1, "reason");
+    EXPECT_TRUE(last_was_error_);
+    EXPECT_TRUE(issue_called_);
+
+    issue_called_ = false;
+
+    callbacks_.warning("source", 1, "reason");
+    EXPECT_FALSE(last_was_error_);
+    EXPECT_TRUE(issue_called_);
+}
+
+// Call the add callback
+TEST_F(MasterLoaderCallbacksTest, addCall) {
+    EXPECT_FALSE(issue_called_);
+    callbacks_.addRRset(rrset_);
+    EXPECT_TRUE(add_called_);
+}
+
+
+}



More information about the bind10-changes mailing list