mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
Updated tests to explicitly set allow_mult and dvv_enabled, as
overriding default_bucket_props in advanced_config without
explicitly setting these returns different values with the fix for
allow_mult turning to true with an app.config file present.
Cherry-picked from 619b24e
This commit is contained in:
parent
bc892ece50
commit
6665465d62
@ -721,7 +721,13 @@ wait_until_no_pending_changes(Nodes) ->
|
||||
rpc:multicall(Nodes, riak_core_vnode_manager, force_handoffs, []),
|
||||
{Rings, BadNodes} = rpc:multicall(Nodes, riak_core_ring_manager, get_raw_ring, []),
|
||||
Changes = [ riak_core_ring:pending_changes(Ring) =:= [] || {ok, Ring} <- Rings ],
|
||||
BadNodes =:= [] andalso length(Changes) =:= length(Nodes) andalso lists:all(fun(T) -> T end, Changes)
|
||||
case BadNodes =:= [] andalso length(Changes) =:= length(Nodes) andalso lists:all(fun(T) -> T end, Changes) of
|
||||
true -> true;
|
||||
false ->
|
||||
NodesWithChanges = [Node || {Node, false} <- lists:zip(Nodes -- BadNodes, Changes)],
|
||||
lager:info("Changes not yet complete, or bad nodes. BadNodes=~p, Nodes with Pending Changes=~p~n", [BadNodes, NodesWithChanges]),
|
||||
false
|
||||
end
|
||||
end,
|
||||
?assertEqual(ok, wait_until(F)),
|
||||
ok.
|
||||
|
@ -10,7 +10,11 @@ confirm() ->
|
||||
lager:info("Deploy some nodes"),
|
||||
Nodes = rt:build_cluster(4, [], [
|
||||
{riak_core, [{default_bucket_props,
|
||||
[{n_val, 2}]}]}]),
|
||||
[
|
||||
{n_val, 2},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}]}]),
|
||||
Node = hd(Nodes),
|
||||
|
||||
RMD = riak_test_runner:metadata(),
|
||||
|
@ -64,7 +64,12 @@ confirm() ->
|
||||
pass.
|
||||
|
||||
config() ->
|
||||
[{riak_core, [{default_bucket_props, [{n_val, 5}]},
|
||||
[{riak_core, [{default_bucket_props,
|
||||
[
|
||||
{n_val, 5},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]},
|
||||
{vnode_management_timer, 1000},
|
||||
{ring_creation_size, 16},
|
||||
{enable_consensus, true},
|
||||
|
@ -27,7 +27,12 @@
|
||||
-define(RING_SIZE, 16).
|
||||
|
||||
config() ->
|
||||
[{riak_core, [{default_bucket_props, [{n_val, 5}]},
|
||||
[{riak_core, [{default_bucket_props,
|
||||
[
|
||||
{n_val, 5},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]},
|
||||
{vnode_management_timer, 1000},
|
||||
{ring_creation_size, ?RING_SIZE},
|
||||
{enable_consensus, true},
|
||||
|
@ -58,7 +58,12 @@ fast_config(Nval, EnableAAE) when is_boolean(EnableAAE) ->
|
||||
|
||||
fast_config(NVal, RingSize, EnableAAE) ->
|
||||
[config_aae(EnableAAE),
|
||||
{riak_core, [{default_bucket_props, [{n_val, NVal}]},
|
||||
{riak_core, [{default_bucket_props,
|
||||
[
|
||||
{n_val, NVal,
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}}
|
||||
]},
|
||||
{vnode_management_timer, 1000},
|
||||
{ring_creation_size, RingSize},
|
||||
{enable_consensus, true}]}].
|
||||
|
@ -13,7 +13,11 @@ confirm() ->
|
||||
lager:info("Deploy some nodes"),
|
||||
Nodes = rt:build_cluster(4, [], [
|
||||
{riak_core, [{default_bucket_props,
|
||||
[{n_val, 2}]}]}]),
|
||||
[
|
||||
{n_val, 2},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}]}]),
|
||||
Node = hd(Nodes),
|
||||
|
||||
RMD = riak_test_runner:metadata(),
|
||||
|
@ -30,7 +30,7 @@ confirm() ->
|
||||
PrivDir = rt:priv_dir(),
|
||||
Conf = [
|
||||
{riak_core, [
|
||||
{default_bucket_props, [{allow_mult, true}]},
|
||||
{default_bucket_props, [{allow_mult, true}, {dvv_enabled, true}]},
|
||||
{ssl, [
|
||||
{certfile, filename:join([CertDir,
|
||||
"site3.basho.com/cert.pem"])},
|
||||
|
@ -57,7 +57,12 @@ default_config(#config{
|
||||
fsm_limit = FsmLimit
|
||||
}) ->
|
||||
[{riak_core, [{ring_creation_size, 8},
|
||||
{default_bucket_props, [{n_val, 5}]},
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, 5},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]},
|
||||
{vnode_management_timer, 1000},
|
||||
{enable_health_checks, false},
|
||||
{enable_consensus, true},
|
||||
|
@ -53,7 +53,7 @@ confirm() ->
|
||||
PrivDir = rt:priv_dir(),
|
||||
Conf = [
|
||||
{riak_core, [
|
||||
{default_bucket_props, [{allow_mult, true}]},
|
||||
{default_bucket_props, [{allow_mult, true}, {dvv_enabled, true}]},
|
||||
{ssl, [
|
||||
{certfile, filename:join([CertDir,"site3.basho.com/cert.pem"])},
|
||||
{keyfile, filename:join([CertDir, "site3.basho.com/key.pem"])},
|
||||
|
@ -16,7 +16,12 @@
|
||||
{riak_core,
|
||||
[
|
||||
{ring_creation_size, 8},
|
||||
{default_bucket_props, [{n_val, 1}]}
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, 1},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}
|
||||
]
|
||||
},
|
||||
{riak_kv,
|
||||
|
@ -22,7 +22,12 @@ confirm() ->
|
||||
{riak_core,
|
||||
[
|
||||
{ring_creation_size, 8},
|
||||
{default_bucket_props, [{n_val, 1}]}
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, 1},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}
|
||||
]
|
||||
},
|
||||
{riak_kv,
|
||||
|
@ -11,7 +11,12 @@
|
||||
{riak_core,
|
||||
[
|
||||
{ring_creation_size, 8},
|
||||
{default_bucket_props, [{n_val, 1}]}
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, 1},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}
|
||||
]
|
||||
},
|
||||
{riak_kv,
|
||||
|
@ -13,7 +13,12 @@
|
||||
{riak_core,
|
||||
[
|
||||
{ring_creation_size, 8},
|
||||
{default_bucket_props, [{n_val, 1}]}
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, 1},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}
|
||||
]
|
||||
},
|
||||
{riak_kv,
|
||||
|
@ -11,7 +11,12 @@
|
||||
{riak_core,
|
||||
[
|
||||
{ring_creation_size, 8},
|
||||
{default_bucket_props, [{n_val, ?N}]}
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, ?N},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]}
|
||||
]
|
||||
},
|
||||
{riak_kv,
|
||||
|
@ -62,7 +62,7 @@ confirm() ->
|
||||
make_clusters() ->
|
||||
Conf = [{riak_repl, [{fullsync_on_connect, false},
|
||||
{fullsync_interval, disabled}]},
|
||||
{riak_core, [{default_bucket_props, [{allow_mult, true}]}]}],
|
||||
{riak_core, [{default_bucket_props, [{allow_mult, true}, {dvv_enabled, true}]}]}],
|
||||
Nodes = rt:deploy_nodes(6, Conf, [riak_kv, riak_repl]),
|
||||
{ClusterA, ClusterB} = lists:split(3, Nodes),
|
||||
A = make_cluster(ClusterA, "A"),
|
||||
|
@ -38,7 +38,12 @@
|
||||
[{riak_core,
|
||||
[
|
||||
{ring_creation_size, 16},
|
||||
{default_bucket_props, [{n_val, ?N}]},
|
||||
{default_bucket_props,
|
||||
[
|
||||
{n_val, ?N},
|
||||
{allow_mult, true},
|
||||
{dvv_enabled, true}
|
||||
]},
|
||||
{anti_entropy_build_limit, {100, 1000}},
|
||||
{anti_entropy_concurrency, 8}
|
||||
]},
|
||||
|
Loading…
Reference in New Issue
Block a user