mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
Merge pull request #513 from basho/bugfix/sdc/allow-mult-default
Fix tests that used the wrong name for the riak.conf entry for allow_mult
This commit is contained in:
commit
24619c638b
@ -14,7 +14,7 @@
|
||||
|
||||
confirm() ->
|
||||
%% test requires allow_mult=false b/c of rt:systest_read
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
{ok, TestCommand} = prereqs(),
|
||||
Config = [{riak_kv, [{secondary_index_sort_default, true}]},
|
||||
{riak_search, [{enabled, true}]}],
|
||||
|
@ -17,7 +17,7 @@
|
||||
%% @doc riak_test entry point
|
||||
confirm() ->
|
||||
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
%% Start up two >1.3.2 clusters and connect them,
|
||||
{LeaderA, LeaderB, ANodes, BNodes} = make_clusters(),
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
confirm() ->
|
||||
|
||||
%% test requires allow_mult=false
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
|
||||
NumNodes = rt_config:get(num_nodes, 6),
|
||||
ClusterASize = rt_config:get(cluster_a_size, 3),
|
||||
|
@ -7,7 +7,7 @@
|
||||
confirm() ->
|
||||
|
||||
%% test requires allow_mult=false
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
|
||||
NumNodes = rt_config:get(num_nodes, 6),
|
||||
ClusterASize = rt_config:get(cluster_a_size, 3),
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
confirm() ->
|
||||
%% test requires allow_mult=false
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
|
||||
NumNodes = rt_config:get(num_nodes, 6),
|
||||
ClusterASize = rt_config:get(cluster_a_size, 3),
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
confirm() ->
|
||||
%% test requires allow_mult=false b/c of rt:systest_read
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
|
||||
case eunit:test(?MODULE, [verbose]) of
|
||||
ok ->
|
||||
|
@ -9,10 +9,10 @@
|
||||
|
||||
confirm() ->
|
||||
%% test requires allow_mult=false b/c of rt:systest_read
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
[Node] = rt:build_cluster(1),
|
||||
rt:wait_until_pingable(Node),
|
||||
|
||||
|
||||
HC = rt:httpc(Node),
|
||||
lager:info("setting up initial data and loading remote code"),
|
||||
rt:httpc_write(HC, <<"foo">>, <<"bar">>, <<"foobarbaz\n">>),
|
||||
@ -28,42 +28,42 @@ confirm() ->
|
||||
[{{prepare,2}, slow_prepare}]}),
|
||||
rt_intercept:add(Node, {riak_kv_vnode,
|
||||
[{{handle_coverage,4}, slow_handle_coverage}]}),
|
||||
|
||||
|
||||
|
||||
|
||||
lager:info("testing HTTP API"),
|
||||
|
||||
lager:info("testing GET timeout"),
|
||||
{error, Tup1} = rhc:get(HC, <<"foo">>, <<"bar">>, [{timeout, 100}]),
|
||||
?assertMatch({ok, "503", _, <<"request timed out\n">>}, Tup1),
|
||||
|
||||
|
||||
lager:info("testing PUT timeout"),
|
||||
{error, Tup2} = rhc:put(HC, riakc_obj:new(<<"foo">>, <<"bar">>,
|
||||
<<"getgetgetgetget\n">>),
|
||||
[{timeout, 100}]),
|
||||
?assertMatch({ok, "503", _, <<"request timed out\n">>}, Tup2),
|
||||
|
||||
|
||||
lager:info("testing DELETE timeout"),
|
||||
{error, Tup3} = rhc:delete(HC, <<"foo">>, <<"bar">>, [{timeout, 100}]),
|
||||
?assertMatch({ok, "503", _, <<"request timed out\n">>}, Tup3),
|
||||
|
||||
|
||||
lager:info("testing invalid timeout value"),
|
||||
{error, Tup4} = rhc:get(HC, <<"foo">>, <<"bar">>, [{timeout, asdasdasd}]),
|
||||
?assertMatch({ok, "400", _,
|
||||
<<"Bad timeout value \"asdasdasd\"\n">>},
|
||||
<<"Bad timeout value \"asdasdasd\"\n">>},
|
||||
Tup4),
|
||||
|
||||
lager:info("testing GET still works before long timeout"),
|
||||
{ok, O} = rhc:get(HC, <<"foo">>, <<"bar">>, [{timeout, 4000}]),
|
||||
|
||||
%% either of these are potentially valid.
|
||||
case riakc_obj:get_value(O) of
|
||||
<<"foobarbaz\n">> ->
|
||||
case riakc_obj:get_value(O) of
|
||||
<<"foobarbaz\n">> ->
|
||||
lager:info("Original Value"),
|
||||
ok;
|
||||
<<"getgetgetgetget\n">> ->
|
||||
<<"getgetgetgetget\n">> ->
|
||||
lager:info("New Value"),
|
||||
ok;
|
||||
V -> ?assertEqual({object_value, <<"getgetgetgetget\n">>},
|
||||
V -> ?assertEqual({object_value, <<"getgetgetgetget\n">>},
|
||||
{object_value, V})
|
||||
end,
|
||||
|
||||
@ -79,34 +79,34 @@ confirm() ->
|
||||
?assertEqual(BOOM, PGET),
|
||||
|
||||
lager:info("testing PUT timeout"),
|
||||
PPUT = riakc_pb_socket:put(PC,
|
||||
PPUT = riakc_pb_socket:put(PC,
|
||||
riakc_obj:new(<<"foo">>, <<"bar2">>,
|
||||
<<"get2get2get2get2get\n">>),
|
||||
[{timeout, 100}]),
|
||||
?assertEqual(BOOM, PPUT),
|
||||
|
||||
|
||||
lager:info("testing DELETE timeout"),
|
||||
PDEL = riakc_pb_socket:delete(PC, <<"foo">>, <<"bar2">>,
|
||||
PDEL = riakc_pb_socket:delete(PC, <<"foo">>, <<"bar2">>,
|
||||
[{timeout, 100}]),
|
||||
?assertEqual(BOOM, PDEL),
|
||||
|
||||
lager:info("testing invalid timeout value"),
|
||||
?assertError(badarg, riakc_pb_socket:get(PC, <<"foo">>, <<"bar2">>,
|
||||
?assertError(badarg, riakc_pb_socket:get(PC, <<"foo">>, <<"bar2">>,
|
||||
[{timeout, asdasdasd}])),
|
||||
|
||||
lager:info("testing GET still works before long timeout"),
|
||||
{ok, O2} = riakc_pb_socket:get(PC, <<"foo">>, <<"bar2">>,
|
||||
{ok, O2} = riakc_pb_socket:get(PC, <<"foo">>, <<"bar2">>,
|
||||
[{timeout, 4000}]),
|
||||
|
||||
%% either of these are potentially valid.
|
||||
case riakc_obj:get_value(O2) of
|
||||
<<"get2get2get2get2get\n">> ->
|
||||
case riakc_obj:get_value(O2) of
|
||||
<<"get2get2get2get2get\n">> ->
|
||||
lager:info("New Value"),
|
||||
ok;
|
||||
<<"foobarbaz2\n">> ->
|
||||
<<"foobarbaz2\n">> ->
|
||||
lager:info("Original Value"),
|
||||
ok;
|
||||
V2 -> ?assertEqual({object_value, <<"get2get2get2get2get\n">>},
|
||||
V2 -> ?assertEqual({object_value, <<"get2get2get2get2get\n">>},
|
||||
{object_value, V2})
|
||||
end,
|
||||
|
||||
@ -143,8 +143,8 @@ confirm() ->
|
||||
lager:info("Checking stream buckets works w/ long timeout"),
|
||||
{ok, ReqId7} = riakc_pb_socket:stream_list_buckets(Pid, Long),
|
||||
wait_for_end(ReqId7),
|
||||
|
||||
|
||||
|
||||
|
||||
lager:info("Checking HTTP"),
|
||||
LHC = rt:httpc(Node),
|
||||
lager:info("Checking keys timeout"),
|
||||
@ -161,10 +161,10 @@ confirm() ->
|
||||
wait_for_end(ReqId4),
|
||||
|
||||
lager:info("Checking buckets timeout"),
|
||||
?assertMatch({error, <<"timeout">>},
|
||||
?assertMatch({error, <<"timeout">>},
|
||||
rhc:list_buckets(LHC, Short)),
|
||||
lager:info("Checking buckets w/ long timeout"),
|
||||
?assertMatch({ok, _},
|
||||
?assertMatch({ok, _},
|
||||
rhc:list_buckets(LHC, Long)),
|
||||
lager:info("Checking stream buckets timeout"),
|
||||
{ok, ReqId3} = rhc:stream_list_buckets(LHC, Short),
|
||||
@ -218,7 +218,7 @@ wait_for_end(ReqId) ->
|
||||
end.
|
||||
|
||||
|
||||
put_buckets(Node, Num) ->
|
||||
put_buckets(Node, Num) ->
|
||||
Pid = rt:pbc(Node),
|
||||
Buckets = [list_to_binary(["", integer_to_list(Ki)])
|
||||
|| Ki <- lists:seq(0, Num - 1)],
|
||||
|
@ -27,12 +27,12 @@
|
||||
|
||||
confirm() ->
|
||||
%% test requires allow_mult=false b/c of rt:systest_read
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
%% Deploy a set of new nodes
|
||||
lager:info("Deploying 4 nodes"),
|
||||
%% handoff_concurrency needs to be raised to make the leave operation faster.
|
||||
%% most clusters go up to 10, but this one is one louder, isn't it?
|
||||
[Node1, Node2, Node3, Node4] = Nodes = rt:deploy_nodes(4, [{riak_core, [{handoff_concurrency, 11}]}]),
|
||||
[Node1, Node2, Node3, Node4] = Nodes = rt:deploy_nodes(4, [{riak_core, [{handoff_concurrency, 11}]}]),
|
||||
|
||||
%% Ensure each node owns 100% of it's own ring
|
||||
lager:info("Ensure each nodes 100% of it's own ring"),
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
confirm() ->
|
||||
%% test requires allow_mult=false b/c of rt:systest_read
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
rt:update_app_config(all, [{riak_core,
|
||||
[{ring_creation_size, ?START_SIZE}]}]),
|
||||
[ANode, AnotherNode, YetAnother, ReplacingNode] = AllNodes = rt:deploy_nodes(4),
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
confirm() ->
|
||||
ClusterSize = 4,
|
||||
rt:set_conf(all, [{"buckets.default.siblings", "off"}]),
|
||||
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
|
||||
NewConfig = [],
|
||||
Nodes = rt:build_cluster(ClusterSize, NewConfig),
|
||||
?assertEqual(ok, rt:wait_until_nodes_ready(Nodes)),
|
||||
|
Loading…
Reference in New Issue
Block a user