Skip to content

Commit 0daccbb

Browse files
committed
Refactor test.
- Move noshrink to g_uuid. - Remove dead code.
1 parent fe8ffc6 commit 0daccbb

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

tests/verify_listkeys_eqcfsm.erl

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ g_num_keys() ->
3939
choose(10, 1000).
4040

4141
g_uuid() ->
42-
eqc_gen:bind(eqc_gen:bool(), fun(_) -> druuid:v4_str() end).
42+
noshrink(eqc_gen:bind(eqc_gen:bool(), fun(_) -> druuid:v4_str() end)).
4343

4444
g_bucket_type() ->
4545
oneof(bucket_types()).
@@ -90,7 +90,7 @@ building_cluster(_S) ->
9090

9191
preloading_data(S) ->
9292
[
93-
{verifying_data, {call, ?MODULE, preload_data, [g_bucket_type(), noshrink(g_uuid()), hd(S#state.nodes_up),
93+
{verifying_data, {call, ?MODULE, preload_data, [g_bucket_type(), g_uuid(), hd(S#state.nodes_up),
9494
g_num_keys(), g_key_filter()]}}
9595
].
9696

@@ -234,17 +234,6 @@ put_keys(Node, Bucket, Num) ->
234234
catch(riakc_pb_socket:stop(Pid))
235235
end.
236236

237-
put_buckets(Node, Num) ->
238-
lager:info("[CMD] Putting ~p buckets on ~p", [Num, Node]),
239-
Pid = rt:pbc(Node),
240-
try
241-
Buckets = [list_to_binary(["", integer_to_list(Ki)]) || Ki <- lists:seq(0, Num - 1)],
242-
{Key, Val} = {<<"test_key">>, <<"test_value">>},
243-
[riakc_pb_socket:put(Pid, riakc_obj:new(Bucket, Key, Val)) || Bucket <- Buckets]
244-
after
245-
catch(riakc_pb_socket:stop(Pid))
246-
end.
247-
248237
sort_keys({error, _}=Error) ->
249238
Error;
250239
sort_keys(Keys) ->

0 commit comments

Comments
 (0)