summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2020-09-10 14:56:35 -0500
committerPaul J. Davis <paul.joseph.davis@gmail.com>2020-09-10 14:59:42 -0500
commit9412526730c39394282d2b18c6cb5d2e7dcbb461 (patch)
treed8be0f400afd5a07d915f0a6540bd362df479786
parent6cedf870b9e1580007f7c20a0359d4be3d5abc3b (diff)
downloadcouchdb-9412526730c39394282d2b18c6cb5d2e7dcbb461.tar.gz
Fix flaky active tasks test
Depending on the computer and ordering of tests couch_rate will sometimes give a budget of 1000 or more. This leads the active tasks test to grab the initial _active_task blob which contains `"changes_done": 0` which fails the test.
-rw-r--r--src/couch_views/test/couch_views_active_tasks_test.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/couch_views/test/couch_views_active_tasks_test.erl b/src/couch_views/test/couch_views_active_tasks_test.erl
index c782ffcbd..6085d73a8 100644
--- a/src/couch_views/test/couch_views_active_tasks_test.erl
+++ b/src/couch_views/test/couch_views_active_tasks_test.erl
@@ -47,6 +47,9 @@ foreach_setup() ->
Docs = make_docs(?TOTAL_DOCS),
fabric2_db:update_docs(Db, [DDoc | Docs]),
+ meck:new(couch_rate, [passthrough]),
+ meck:expect(couch_rate, budget, fun(_) -> 100 end),
+
{Db, DDoc}.