You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/09/10 19:59:52 UTC

[couchdb] branch prototype/fdb-layer updated: Fix flaky active tasks test

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/prototype/fdb-layer by this push:
     new 9412526  Fix flaky active tasks test
9412526 is described below

commit 9412526730c39394282d2b18c6cb5d2e7dcbb461
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Sep 10 14:56:35 2020 -0500

    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.
---
 src/couch_views/test/couch_views_active_tasks_test.erl | 3 +++
 1 file changed, 3 insertions(+)

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 c782ffc..6085d73 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}.