diff options
author | sebastianro <sebastianro@apache.org> | 2017-07-05 22:01:03 +0200 |
---|---|---|
committer | Joan Touzet <wohali@users.noreply.github.com> | 2017-07-05 16:51:39 -0400 |
commit | 858088e3838207f37b33a1ca5c76b21e62e2b7dc (patch) | |
tree | 8c1e874c26724e0051fc17fb97f4c97888b4f6f7 | |
parent | 7f545167e4b7175c051171024b711de141b8acbf (diff) | |
download | couchdb-858088e3838207f37b33a1ca5c76b21e62e2b7dc.tar.gz |
Make map functions distinct with each invocation
-rw-r--r-- | test/javascript/couch.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/javascript/couch.js b/test/javascript/couch.js index c7b8d9502..6ff3005f6 100644 --- a/test/javascript/couch.js +++ b/test/javascript/couch.js @@ -147,6 +147,9 @@ function CouchDB(name, httpHeaders, globalRequestOptions) { if (typeof(mapFun) != "string") { mapFun = mapFun.toSource ? mapFun.toSource() : "(" + mapFun.toString() + ")"; } + if ((!language) || language.toLowerCase() == "javascript") { + mapFun = mapFun + "/" + "* avoid race cond " + (new Date().getTime()) + " *" + "/"; + } body.map = mapFun; if (reduceFun != null) { if (typeof(reduceFun) != "string") { |