summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2019-11-16 16:08:23 -0500
committerGitHub <noreply@github.com>2019-11-16 16:08:23 -0500
commit081fc1ac049ec3be22c42b7bece8fe137e712f50 (patch)
treec20e58ae31c91dd520f9641284f5543cc1aea985
parentbd1e8a6fcb414368ebf675ad24bc65eacadbb2d6 (diff)
downloadcouchdb-081fc1ac049ec3be22c42b7bece8fe137e712f50.tar.gz
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.
-rw-r--r--Jenkinsfile16
-rw-r--r--Makefile2
-rw-r--r--src/mango/test/13-stable-update-test.py7
3 files changed, 15 insertions, 10 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 342ac6c83..b98b47a10 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 f09ae326a..4c1283b57 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 348ac5ee7..303f3fab1 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):