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 13:52:32 -0600
commita25223236f24074a7e87f71b9e834fa567e1cd2b (patch)
tree5e5d69c8977911cd20ec0f6fffb0105d8ce76851
parent8169a3325fff425be0712524555b15eecb9f6aaf (diff)
downloadcouchdb-a25223236f24074a7e87f71b9e834fa567e1cd2b.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 = [