diff options
author | Tony Sun <tony.sun427@gmail.com> | 2017-10-26 17:57:57 -0700 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2017-10-29 15:50:28 +0100 |
commit | 36cb8a2622f1701b393816f58d300ac4d8a58c81 (patch) | |
tree | c10cde127e470d40b29ed13031a77efec81b72b7 | |
parent | afb7c8e4f92833fe93b5931bd15f8068bf219260 (diff) | |
download | couchdb-36cb8a2622f1701b393816f58d300ac4d8a58c81.tar.gz |
Update w value for deletion since n=1
Mango tests are failing due to flaky index deletion issues. We change
the value of w to 1 since n=1.
-rw-r--r-- | src/mango/test/mango.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py index ed4cafbe5..27949c48d 100644 --- a/src/mango/test/mango.py +++ b/src/mango/test/mango.py @@ -122,6 +122,7 @@ class Database(object): body = json.dumps(body) r = self.sess.post(self.path("_index"), data=body) r.raise_for_status() + assert r.json()["id"] is not None assert r.json()["name"] is not None return r.json()["result"] == "created" @@ -165,13 +166,13 @@ class Database(object): def delete_index(self, ddocid, name, idx_type="json"): path = ["_index", ddocid, idx_type, name] - r = self.sess.delete(self.path(path), params={"w":"3"}) + r = self.sess.delete(self.path(path), params={"w": 1}) r.raise_for_status() def bulk_delete(self, docs): body = { "docids" : docs, - "w": 3 + "w": 1 } body = json.dumps(body) r = self.sess.post(self.path("_index/_bulk_delete"), data=body) |