summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@apache.org>2020-04-10 11:38:02 -0400
committerNick Vatamaniuc <vatamane@apache.org>2020-04-10 11:38:02 -0400
commite887b5a53a5de63cec00fdcea9ffb0612397b8c4 (patch)
treec57be3e6d2146bac6fe7f1f546ec4b5767b7ab7d
parentaad871b36d32f0d2e4a1a51a0552bb5cf6a5b199 (diff)
downloadcouchdb-fix-fabric2-indexer-test-flakiness.tar.gz
Fix flaky fabric2_index testfix-fabric2-indexer-test-flakiness
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.
-rw-r--r--src/fabric/test/fabric2_index_tests.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fabric/test/fabric2_index_tests.erl b/src/fabric/test/fabric2_index_tests.erl
index 3fc8a5b18..e0c3e8ba9 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)),