You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2020/04/10 15:40:56 UTC

[couchdb] 01/01: Fix flaky fabric2_index test

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

vatamane pushed a commit to branch fix-fabric2-indexer-test-flakiness
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit e887b5a53a5de63cec00fdcea9ffb0612397b8c4
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Fri Apr 10 11:38:02 2020 -0400

    Fix flaky fabric2_index test
    
    Previously in the the test we first set up the callback, then disabled the
    indexing. By that time, there was a chance that building could have started
    especially in a slower execution environment.
---
 src/fabric/test/fabric2_index_tests.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/fabric/test/fabric2_index_tests.erl b/src/fabric/test/fabric2_index_tests.erl
index 3fc8a5b..e0c3e8b 100644
--- a/src/fabric/test/fabric2_index_tests.erl
+++ b/src/fabric/test/fabric2_index_tests.erl
@@ -213,14 +213,14 @@ updater_processes_stop(#{}) ->
 
 
 indexing_can_be_disabled(#{db1 := Db}) ->
-    Mod = fabric2_test_callback7,
-    setup_callback(Mod),
-
     meck:expect(config, get_boolean, fun
         ("fabric", "index_updater_enabled", _) -> false;
         (_, _, Default) -> Default
     end),
 
+    Mod = fabric2_test_callback7,
+    setup_callback(Mod),
+
     create_doc(Db),
     timer:sleep(500),
     ?assertEqual(0, meck:num_calls(Mod, build_indices, 2)),