You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2019/11/16 21:08:31 UTC
[couchdb] branch master updated: Set autoupdate:false during
update=false mango test (#2314)
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new 081fc1a Set autoupdate:false during update=false mango test (#2314)
081fc1a is described below
commit 081fc1ac049ec3be22c42b7bece8fe137e712f50
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sat Nov 16 16:08:23 2019 -0500
Set autoupdate:false during update=false mango test (#2314)
Set autoupdate:false to avoid update=False flake
The auto-indexer is sometimes sneaking in and causing test failures by
building the index ahead of the update=false query. This should block
that behavior.
Also, save XML output from mango nose tests.
---
Jenkinsfile | 16 ++++++++--------
Makefile | 2 +-
src/mango/test/13-stable-update-test.py | 7 ++++++-
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 342ac6c..b98b47a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -145,7 +145,7 @@ pipeline {
} // steps
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
cleanup {
sh 'rm -rf $COUCHDB_IO_LOG_DIR'
@@ -178,7 +178,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
@@ -225,7 +225,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
@@ -273,7 +273,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
@@ -320,7 +320,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
@@ -367,7 +367,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
@@ -414,7 +414,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
@@ -463,7 +463,7 @@ pipeline {
}
post {
always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml'
}
}
}
diff --git a/Makefile b/Makefile
index f09ae32..4c1283b 100644
--- a/Makefile
+++ b/Makefile
@@ -371,7 +371,7 @@ mango-test: devclean all
@cd src/mango && \
python3 -m venv .venv && \
.venv/bin/python3 -m pip install -r requirements.txt
- @cd src/mango && ../../dev/run -n 1 --admin=testuser:testpass '.venv/bin/python3 -m nose'
+ @cd src/mango && ../../dev/run -n 1 --admin=testuser:testpass '.venv/bin/python3 -m nose --with-xunit'
################################################################################
# Developing
diff --git a/src/mango/test/13-stable-update-test.py b/src/mango/test/13-stable-update-test.py
index 348ac5e..303f3fa 100644
--- a/src/mango/test/13-stable-update-test.py
+++ b/src/mango/test/13-stable-update-test.py
@@ -36,7 +36,12 @@ DOCS1 = [
class SupportStableAndUpdate(mango.DbPerClass):
def setUp(self):
self.db.recreate()
- self.db.create_index(["name"])
+ # Hack to prevent auto-indexer from foiling update=False test
+ # https://github.com/apache/couchdb/issues/2313
+ self.db.save_doc(
+ {"_id": "_design/foo", "language": "query", "autoupdate": False}
+ )
+ self.db.create_index(["name"], ddoc="foo")
self.db.save_docs(copy.deepcopy(DOCS1))
def test_update_updates_view_when_specified(self):