BIND 10 master, updated. 403c7178590825e101e0822715fa557403ff5c33 [master] fix regression in MasterLoaderTest

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Apr 9 15:11:46 UTC 2013


The branch, master has been updated
       via  403c7178590825e101e0822715fa557403ff5c33 (commit)
      from  68863a7847788b6dfa9de464c5daf7e48db6a273 (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 403c7178590825e101e0822715fa557403ff5c33
Author: Jeremy C. Reed <jreed at isc.org>
Date:   Tue Apr 9 10:09:48 2013 -0500

    [master] fix regression in MasterLoaderTest
    
    I introduced problem by fixing a typo in a comment in a zone file.
    The character positions or file sizes of the file were hardcoded
    in the unit test. I had seen the failure on my system but didn't
    associate it. (My mistake for not looking closely.)
    
    The typo fix added one character so changed the hardcoded 549 to 500
    and 506 to 507.
    
    (Later maybe some macros should be used for this?)

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

Summary of changes:
 src/lib/dns/tests/master_loader_unittest.cc |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/master_loader_unittest.cc b/src/lib/dns/tests/master_loader_unittest.cc
index 653da05..ce9b8f7 100644
--- a/src/lib/dns/tests/master_loader_unittest.cc
+++ b/src/lib/dns/tests/master_loader_unittest.cc
@@ -167,8 +167,8 @@ TEST_F(MasterLoaderTest, basicLoad) {
 
     // Hardcode expected values taken from the test data file, assuming it
     // won't change too often.
-    EXPECT_EQ(549, loader_->getSize());
-    EXPECT_EQ(549, loader_->getPosition());
+    EXPECT_EQ(550, loader_->getSize());
+    EXPECT_EQ(550, loader_->getPosition());
 
     checkBasicRRs();
 }
@@ -227,20 +227,20 @@ TEST_F(MasterLoaderTest, includeAndIncremental) {
     EXPECT_EQ(zone_data.size(), loader_->getSize());
     EXPECT_EQ(first_rr.size(), loader_->getPosition());
 
-    // Read next 4.  It includes $INCLUDE processing.  Magic number of 549
-    // is the size of the test zone file (see above); 506 is the position in
+    // Read next 4.  It includes $INCLUDE processing.  Magic number of 550
+    // is the size of the test zone file (see above); 507 is the position in
     // the file at the end of 4th RR (due to extra comments it's smaller than
     // the file size).
     loader_->loadIncremental(4);
-    EXPECT_EQ(zone_data.size() + 549, loader_->getSize());
-    EXPECT_EQ(first_rr.size() + include_str.size() + 506,
+    EXPECT_EQ(zone_data.size() + 550, loader_->getSize());
+    EXPECT_EQ(first_rr.size() + include_str.size() + 507,
               loader_->getPosition());
 
     // Read the last one.  At this point getSize and getPosition return
     // the same value, indicating progress of 100%.
     loader_->loadIncremental(1);
-    EXPECT_EQ(zone_data.size() + 549, loader_->getSize());
-    EXPECT_EQ(zone_data.size() + 549, loader_->getPosition());
+    EXPECT_EQ(zone_data.size() + 550, loader_->getSize());
+    EXPECT_EQ(zone_data.size() + 550, loader_->getPosition());
 
     // we were not interested in checking RRs in this test.  clear them to
     // not confuse TearDown().



More information about the bind10-changes mailing list