BIND 10 trac1845, updated. 44d2850a0d3e96ad2b405aadb222a975c0462826 [1845] also check new rollback behaviour

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Apr 5 09:30:40 UTC 2012


The branch, trac1845 has been updated
       via  44d2850a0d3e96ad2b405aadb222a975c0462826 (commit)
      from  8a33648413f84e7a7be65db8890d217d91f7c8f6 (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 44d2850a0d3e96ad2b405aadb222a975c0462826
Author: Jelte Jansen <jelte at isc.org>
Date:   Thu Apr 5 11:30:11 2012 +0200

    [1845] also check new rollback behaviour
    
    And add corresponding EXPECT statements on the 'running' transaction

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

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

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
index fe6ddbc..591fe15 100644
--- a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
+++ b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
@@ -777,15 +777,20 @@ TEST_F(SQLite3Update,  rollbackFailure) {
     // the rollback operation at the end of the test.
 
     // Since SQLite3 version 3.7.11, rollbacks do not fail on pending
-    // transactions anymore, making this test fail (and moot). So
-    // we'll only try on older versions
-#if SQLITE_VERSION_NUMBER < 3007011
+    // transactions anymore, making this test fail (and moot), but the
+    // transactions will fail after it, so, depending on version,
+    // we test whether that happens and is caught
     string columns[DatabaseAccessor::COLUMN_COUNT];
     iterator = accessor->getRecords("example.com.", zone_id);
     EXPECT_TRUE(iterator->getNext(columns));
 
     accessor->startUpdateZone("example.com.", true);
+#if SQLITE_VERSION_NUMBER < 3007011
     EXPECT_THROW(accessor->rollback(), DataSourceError);
+    EXPECT_NO_THROW(iterator->getNext(columns));
+#else
+    EXPECT_NO_THROW(accessor->rollback());
+    EXPECT_THROW(iterator->getNext(columns), DataSourceError);
 #endif
 }
 



More information about the bind10-changes mailing list