You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2017/10/29 14:50:31 UTC
[couchdb] branch master updated (afb7c8e -> 7eaff43)
This is an automated email from the ASF dual-hosted git repository.
jan pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
from afb7c8e feat: port time funs, as per #883
new 36cb8a2 Update w value for deletion since n=1
new 0dde611 use string for w value
new 91508cc use delay instead
new ab44fab up delay
new 6d92666 add delay for bulk_delete and create
new 7eaff43 whitespace
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/mango/test/mango.py | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].
[couchdb] 01/06: Update w value for deletion since n=1
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 36cb8a2622f1701b393816f58d300ac4d8a58c81
Author: Tony Sun <to...@gmail.com>
AuthorDate: Thu Oct 26 17:57:57 2017 -0700
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.
---
src/mango/test/mango.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py
index ed4cafb..27949c4 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)
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 05/06: add delay for bulk_delete and create
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 6d92666f5a5b9a6494121c83beaa3bc03e09097f
Author: Tony Sun <to...@gmail.com>
AuthorDate: Sat Oct 28 09:15:22 2017 -0700
add delay for bulk_delete and create
---
src/mango/test/mango.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py
index 4ae015c..cbf2b11 100644
--- a/src/mango/test/mango.py
+++ b/src/mango/test/mango.py
@@ -126,6 +126,7 @@ class Database(object):
body["index"]["partial_filter_selector"] = partial_filter_selector
body = json.dumps(body)
r = self.sess.post(self.path("_index"), data=body)
+ delay()
r.raise_for_status()
assert r.json()["id"] is not None
@@ -157,6 +158,7 @@ class Database(object):
body["ddoc"] = ddoc
body = json.dumps(body)
r = self.sess.post(self.path("_index"), data=body)
+ delay()
r.raise_for_status()
return r.json()["result"] == "created"
@@ -182,6 +184,7 @@ class Database(object):
}
body = json.dumps(body)
r = self.sess.post(self.path("_index/_bulk_delete"), data=body)
+ delay(n=10)
return r.json()
def find(self, selector, limit=25, skip=0, sort=None, fields=None,
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 04/06: up delay
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit ab44fabd1070e0f4e2dbd262b1c870a37349ce0d
Author: Tony Sun <to...@gmail.com>
AuthorDate: Fri Oct 27 11:20:03 2017 -0700
up delay
---
src/mango/test/mango.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py
index dd58e74..4ae015c 100644
--- a/src/mango/test/mango.py
+++ b/src/mango/test/mango.py
@@ -34,7 +34,7 @@ def get_from_environment(key, default):
return value if value is not None else default
# add delay functionality
-def delay(n=5, t=0.2):
+def delay(n=5, t=0.5):
for i in range(0, n):
time.sleep(t)
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 02/06: use string for w value
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 0dde611212173b7f01921d24d0757c88bfae1668
Author: Tony Sun <to...@gmail.com>
AuthorDate: Thu Oct 26 18:13:23 2017 -0700
use string for w value
---
src/mango/test/mango.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py
index 27949c4..1ed2a2c 100644
--- a/src/mango/test/mango.py
+++ b/src/mango/test/mango.py
@@ -166,7 +166,7 @@ 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": 1})
+ r = self.sess.delete(self.path(path), params={"w": "1"})
r.raise_for_status()
def bulk_delete(self, docs):
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 06/06: whitespace
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 7eaff43b9b67e646646c795a8d9af19b57806cfd
Author: Tony Sun <to...@gmail.com>
AuthorDate: Sat Oct 28 11:57:23 2017 -0700
whitespace
---
src/mango/test/mango.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py
index cbf2b11..03cc67c 100644
--- a/src/mango/test/mango.py
+++ b/src/mango/test/mango.py
@@ -128,7 +128,6 @@ class Database(object):
r = self.sess.post(self.path("_index"), data=body)
delay()
r.raise_for_status()
-
assert r.json()["id"] is not None
assert r.json()["name"] is not None
return r.json()["result"] == "created"
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 03/06: use delay instead
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 91508cc19b589edd5c690204e8b0d5ff01b64251
Author: Tony Sun <to...@gmail.com>
AuthorDate: Fri Oct 27 10:43:58 2017 -0700
use delay instead
---
src/mango/test/mango.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/mango/test/mango.py b/src/mango/test/mango.py
index 1ed2a2c..dd58e74 100644
--- a/src/mango/test/mango.py
+++ b/src/mango/test/mango.py
@@ -33,6 +33,11 @@ def get_from_environment(key, default):
value = os.environ.get(key)
return value if value is not None else default
+# add delay functionality
+def delay(n=5, t=0.2):
+ for i in range(0, n):
+ time.sleep(t)
+
class Database(object):
def __init__(self, dbname,
@@ -77,9 +82,9 @@ class Database(object):
def recreate(self):
self.delete()
- time.sleep(1)
+ delay()
self.create()
- time.sleep(1)
+ delay()
def save_doc(self, doc):
self.save_docs([doc])
@@ -166,13 +171,14 @@ 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": "1"})
+ r = self.sess.delete(self.path(path), params={"w": "3"})
+ delay()
r.raise_for_status()
def bulk_delete(self, docs):
body = {
"docids" : docs,
- "w": 1
+ "w": 3
}
body = json.dumps(body)
r = self.sess.post(self.path("_index/_bulk_delete"), data=body)
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.