ts_cluster_updowngrade_*: exclude downgrades from scenarios, for 1.5-1.4

This commit is contained in:
Andrei Zavada 2016-11-07 00:54:06 +02:00
parent 63f7edbeb9
commit 924f2888aa
3 changed files with 18 additions and 31 deletions

View File

@ -42,12 +42,12 @@ make_scenarios() ->
ensure_full_caps = [{{riak_kv, sql_select_version}, v3}],
ensure_degraded_caps = [{{riak_kv, sql_select_version}, v2}],
convert_config_to_previous = fun ts_updown_util:convert_riak_conf_to_previous/1}
|| TableNodeVsn <- [current, previous],
QueryNodeVsn <- [current, previous],
NeedTableNodeTransition <- [true, false],
NeedQueryNodeTransition <- [true, false],
NeedPreClusterMixed <- [true, false],
NeedPostClusterMixed <- [true, false]],
|| TableNodeVsn <- [previous, current],
QueryNodeVsn <- [current],
NeedTableNodeTransition <- [false],
NeedQueryNodeTransition <- [false],
NeedPreClusterMixed <- [false],
NeedPostClusterMixed <- [false]],
[add_tests(X) || X <- BaseScenarios].
%% This test will not use config invariants
@ -105,8 +105,8 @@ make_group_by_2_test(DoesSelectPass) ->
"PRIMARY KEY ((a,b,quantum(c,1,s)), a,b,c,d))",
expected = {ok, {[], []}}},
Insert = #insert{data = [{1,1,CE,D,CE} || CE <- lists:seq(1,1000),
D <- [1,2,3]],
Insert = #insert{data = [{1,1,CE,D,CE} || CE <- lists:seq(1,1000),
D <- [1,2,3]],
expected = ok},
{SelExp, AssertFn}

View File

@ -63,11 +63,11 @@ make_scenarios() ->
ensure_degraded_caps = [{{riak_kv, sql_select_version}, v2}],
convert_config_to_previous = fun ts_updown_util:convert_riak_conf_to_previous/1}
|| TableNodeVsn <- [current, previous],
QueryNodeVsn <- [current, previous],
NeedTableNodeTransition <- [true, false],
NeedQueryNodeTransition <- [true],
NeedPreClusterMixed <- [true],
NeedPostClusterMixed <- [true]],
QueryNodeVsn <- [current],
NeedTableNodeTransition <- [false],
NeedQueryNodeTransition <- [false],
NeedPreClusterMixed <- [false],
NeedPostClusterMixed <- [false]],
[add_tests(X) || X <- BaseScenarios].
%% This test will not use config invariants
@ -79,19 +79,6 @@ make_scenario_invariants(Config) ->
%% ORDER BY will always work if
%% the query node is 1.5
%% the query node is queried *AFTER* a transition
add_tests(#scenario{query_node_vsn = current,
need_query_node_transition = true} = Scen) ->
Tests = [
make_select_order_by_test(select_fails)
],
Scen#scenario{tests = Tests};
add_tests(#scenario{query_node_vsn = previous,
need_query_node_transition = false} = Scen) ->
Tests = [
make_select_order_by_test(select_fails)
],
Scen#scenario{tests = Tests};
%% in all other scenarios ORDER BY should work
add_tests(Scen) ->
Tests = [
make_select_order_by_test(select_passes)

View File

@ -39,11 +39,11 @@ make_scenarios() ->
ensure_degraded_caps = [{{riak_kv, sql_select_version}, v2}],
convert_config_to_previous = fun ts_updown_util:convert_riak_conf_to_previous/1}
|| TableNodeVsn <- [current, previous],
QueryNodeVsn <- [current, previous],
NeedTableNodeTransition <- [true, false],
NeedQueryNodeTransition <- [true, false],
NeedPreClusterMixed <- [true, false],
NeedPostClusterMixed <- [true, false]].
QueryNodeVsn <- [current],
NeedTableNodeTransition <- [false],
NeedQueryNodeTransition <- [false],
NeedPreClusterMixed <- [false],
NeedPostClusterMixed <- [false]].
make_scenario_invariants(Config) ->