davisp commented on a change in pull request #2666: [WIP] soft-deletion for 
database
URL: https://github.com/apache/couchdb/pull/2666#discussion_r396604849
 
 

 ##########
 File path: src/fabric/test/fabric2_db_crud_tests.erl
 ##########
 @@ -139,6 +144,25 @@ recreate_db(_) ->
     ?assertError(database_does_not_exist, fabric2_db:open(DbName, BadOpts)).
 
 
+restore_db(_) ->
+    DbName = ?tempdb(),
+    ?assertError(database_does_not_exist, fabric2_db:delete(DbName, [])),
+
+    ?assertMatch({ok, _}, fabric2_db:create(DbName, [])),
+    ?assertEqual(true, ets:member(fabric2_server, DbName)),
+
+    ok = config:set("couchdb", "enable_database_recovery", "true", false),
 
 Review comment:
   You should add a function in the  cleanup to set the value back to `false` 
so that we're in a known state after every test runs. Changing the config 
during a test which could fail leaving the config in a weird state is an easy 
way to cause confusion and frustration when debugging test failures.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to