couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [3/5] couch commit: updated refs/heads/master to 9d28c57
Date Mon, 14 Mar 2016 04:12:34 GMT
Update db header now throws an database_disk_version_error error


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/2a006077
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/2a006077
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/2a006077

Branch: refs/heads/master
Commit: 2a006077b9a9761c37d0f29095699907d2635702
Parents: 40adf24
Author: Alexander Shorin <kxepal@apache.org>
Authored: Thu Nov 26 19:58:11 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Mon Mar 14 06:24:31 2016 +0300

----------------------------------------------------------------------
 src/couch_db_header.erl | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2a006077/src/couch_db_header.erl
----------------------------------------------------------------------
diff --git a/src/couch_db_header.erl b/src/couch_db_header.erl
index 2f329c1..355364f 100644
--- a/src/couch_db_header.erl
+++ b/src/couch_db_header.erl
@@ -310,8 +310,6 @@ mk_header(Vsn) ->
     }.
 
 
--ifdef(run_broken_tests).
-
 upgrade_v3_test() ->
     Vsn3Header = mk_header(3),
     NewHeader = upgrade_tuple(Vsn3Header),
@@ -330,17 +328,9 @@ upgrade_v3_test() ->
     ?assertEqual(undefined, uuid(NewHeader)),
     ?assertEqual(undefined, epochs(NewHeader)),
 
-    % Security ptr isn't changed until upgrade_disk_version/1
-    NewNewHeader = upgrade_disk_version(NewHeader),
-    ?assert(is_record(NewNewHeader, db_header)),
-    ?assertEqual(nil, security_ptr(NewNewHeader)),
-
-    % Assert upgrade works on really old headers
-    NewestHeader = upgrade(Vsn3Header),
-    ?assertMatch(<<_:32/binary>>, uuid(NewestHeader)),
-    ?assertEqual([{node(), 0}], epochs(NewestHeader)).
+    ?assertThrow({database_disk_version_error, _},
+                 upgrade_disk_version(NewHeader)).
 
--endif.
 
 upgrade_v5_test() ->
     Vsn5Header = mk_header(5),


Mime
View raw message