You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/07/29 00:31:11 UTC
[3/3] couchdb-khash git commit: Increase timeout limit for randomized
and comparison tests
Increase timeout limit for randomized and comparison tests
Project: http://git-wip-us.apache.org/repos/asf/couchdb-khash/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-khash/commit/fc1a80fe
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-khash/tree/fc1a80fe
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-khash/diff/fc1a80fe
Branch: refs/heads/master
Commit: fc1a80fe38cb7f1c19ba0b4d275f14fbf3b5251e
Parents: 8b3a848
Author: Alexander Shorin <kx...@apache.org>
Authored: Fri Jul 24 05:38:11 2015 +0300
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Jul 24 07:32:16 2015 +0300
----------------------------------------------------------------------
test/khash_test.erl | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-khash/blob/fc1a80fe/test/khash_test.erl
----------------------------------------------------------------------
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
}
}.