diff options
-rw-r--r-- | src/fabric/src/fabric_db_delete.erl | 4 | ||||
-rw-r--r-- | test/javascript/tests-cluster/with-quorum/db-deletion.js | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/fabric/src/fabric_db_delete.erl b/src/fabric/src/fabric_db_delete.erl index a1b51088b..c146cb6cd 100644 --- a/src/fabric/src/fabric_db_delete.erl +++ b/src/fabric/src/fabric_db_delete.erl @@ -79,9 +79,9 @@ maybe_stop(W, Counters) -> case {Ok + NotFound, Ok, NotFound} of {W, 0, W} -> {#shard{dbname=Name}, _} = hd(Counters), - couch_log:warning("~p not_found ~s", [?MODULE, Name]), + couch_log:warning("~p not_found ~d", [?MODULE, Name]), {stop, not_found}; - {N, M, _} when N >= (W div 2 + 1), M > 0 -> + {W, _, _} -> {stop, ok}; {_, M, _} when M > 0 -> {stop,accepted}; diff --git a/test/javascript/tests-cluster/with-quorum/db-deletion.js b/test/javascript/tests-cluster/with-quorum/db-deletion.js index f561e3a0c..079fb493d 100644 --- a/test/javascript/tests-cluster/with-quorum/db-deletion.js +++ b/test/javascript/tests-cluster/with-quorum/db-deletion.js @@ -19,10 +19,10 @@ couchTests.db_deletion = function(debug) { var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"}); db.createDb(); - - // DB Deletion should return 200 - Ok + + // DB Deletion should return 202 - Acceted as the custer is not complete xhr = CouchDB.request("DELETE", "/" + db_name + "/"); - T(xhr.status == 200); + T(xhr.status == 202); // DB Deletion should return 404 - Not found xhr = CouchDB.request("DELETE", "/not-existing-db/"); |