You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2019/02/22 17:28:22 UTC

[couchdb-khash] 15/25: Increase timeout limit for randomized and comparison tests

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

jaydoane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-khash.git

commit fc1a80fe38cb7f1c19ba0b4d275f14fbf3b5251e
Author: Alexander Shorin <kx...@apache.org>
AuthorDate: Fri Jul 24 05:38:11 2015 +0300

    Increase timeout limit for randomized and comparison tests
---
 test/khash_test.erl | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/test/khash_test.erl b/test/khash_test.erl
index cab9820..d1bb9e2 100644
--- a/test/khash_test.erl
+++ b/test/khash_test.erl
@@ -7,6 +7,7 @@
 -define(NUM_RAND_CYCLES, 10000).
 -define(NUM_CYCLES, 1000000).
 -define(NUM_KVS, 5000).
+-define(TIMEOUT, 15).
 
 load_test_() ->
     {
@@ -98,10 +99,10 @@ randomized_test_() ->
                 {ok, Actions, ?NUM_RAND_CYCLES, {Dict, KHash}}
             end,
             fun(State) ->
-                {
+                {timeout, ?TIMEOUT, {
                     "State matches dict implementation",
                     ?_assert(run_randomized(State, true))
-                }
+                }}
             end
         }
     }.
@@ -115,7 +116,7 @@ compare_dict_test_() ->
                 receive after 1000 -> ok end
             end,
             fun(ok) ->
-                [{
+                [{timeout, ?TIMEOUT, {
                     "Dict's fetch is slower than of khash",
                     ?_test(begin
                         {DTime, _} = timer:tc(fun() -> dict_fetch() end, []),
@@ -124,8 +125,8 @@ compare_dict_test_() ->
                         ?debugFmt("KHash: ~10b", [KTime]),
                         ?assert(DTime > KTime)
                     end)
-                },
-                {
+                }},
+                {timeout, ?TIMEOUT, {
                     "Dict's store is slower than of khash",
                     ?_test(begin
                         {DTime, _} = timer:tc(fun() -> dict_store() end, []),
@@ -134,7 +135,7 @@ compare_dict_test_() ->
                         ?debugFmt("KHash: ~10b", [KTime]),
                         ?assert(DTime > KTime)
                     end)
-                }]
+                }}]
             end
         }
     }.