Skip to content

Commit

Permalink
Fixed sleep for riak.
Browse files Browse the repository at this point in the history
  • Loading branch information
cabol committed May 28, 2015
1 parent fb758ed commit 1d7e377
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 1 addition & 4 deletions test/conditional_logic_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ init_per_suite(Config) ->
sumo:persist(Module, Module:new("Joe", "Armstrong")),
sumo:persist(Module, Module:new("Alan", "Turing", 102, "Computer St.")),

case Module of
sumo_test_people_riak -> timer:sleep(5000);
_ -> ok
end
sumo_test_utils:sleep_if_required(Module)
end,

lists:foreach(Fun, sumo_test_utils:people_with_conditional_logic()),
Expand Down
8 changes: 8 additions & 0 deletions test/sumo_test_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
, people_with_conditional_logic/0
, people_with_like/0
, people_with_numeric_sort/0
, sleep_if_required/1
]).

-spec start_apps() -> ok.
Expand Down Expand Up @@ -46,3 +47,10 @@ people_with_like() ->
-spec people_with_numeric_sort() -> [atom()].
people_with_numeric_sort() ->
people_with_conditional_logic() -- [sumo_test_people_riak].

-spec sleep_if_required(atom()) -> ok.
sleep_if_required(Module) ->
case Module of
sumo_test_people_riak -> timer:sleep(5000);
_ -> ok
end.

0 comments on commit 1d7e377

Please sign in to comment.