summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2019-12-25 11:32:26 -0600
committerPaul J. Davis <paul.joseph.davis@gmail.com>2019-12-25 11:45:20 -0600
commit5159058f40fbac344c6f54b881b008e6cd1ee178 (patch)
tree5e5d69c8977911cd20ec0f6fffb0105d8ce76851
parent226a8cd8080e9064eded64f739a3e650d6a94a89 (diff)
downloadcouchdb-5159058f40fbac344c6f54b881b008e6cd1ee178.tar.gz
Speedup eunit: couch_flags_config_tests
This undoes the test per combination approach to avoid the time spent printing each name to the console.
-rw-r--r--src/couch/test/eunit/couch_flags_config_tests.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/couch/test/eunit/couch_flags_config_tests.erl b/src/couch/test/eunit/couch_flags_config_tests.erl
index 1a66cdcff..ed7df1123 100644
--- a/src/couch/test/eunit/couch_flags_config_tests.erl
+++ b/src/couch/test/eunit/couch_flags_config_tests.erl
@@ -16,8 +16,10 @@ couch_flags_config_test_() ->
{
"test couch_flags_config",
{
- setup, fun setup/0, fun teardown/1,
- all_combinations_return_same_result()
+ setup,
+ fun setup/0,
+ fun teardown/1,
+ [fun all_combinations_return_same_result/0]
++ latest_overide_wins()
++ [
{"rules_are_sorted", fun rules_are_sorted/0}
@@ -41,8 +43,9 @@ all_combinations_return_same_result() ->
{{<<"*">>},{<<"*">>, 1, [bar, foo]}}
],
Combinations = couch_tests_combinatorics:permutations(Config),
- [{test_id(Items), ?_assertEqual(Expected, couch_flags_config:data(Items))}
- || Items <- Combinations].
+ lists:foreach(fun(Items) ->
+ ?assertEqual(Expected, couch_flags_config:data(Items))
+ end, Combinations).
rules_are_sorted() ->
Expected = [