1
1
% % -------------------------------------------------------------------
2
2
% %
3
- % % Copyright (c) 2016 Basho Technologies, Inc.
3
+ % % Copyright (c) 2016-2017 Basho Technologies, Inc.
4
4
% %
5
5
% % This file is provided to you under the Apache License,
6
6
% % Version 2.0 (the "License"); you may not use this file
30
30
% %--------------------------------------------------------------------
31
31
32
32
-define (TS_VERSION_CURRENT , " current" ).
33
-
34
- % % git checkout riak_ts-1.3.1 && make locked-deps
35
- -define (TS_VERSION_1_3 , riak_ts_1_3_1 ).
36
-
37
33
-define (SQL_SELECT_CAP , {riak_kv , sql_select_version }).
38
34
39
35
suite () ->
40
36
[{timetrap ,{minutes ,10 }}].
41
37
42
38
init_per_suite (Config ) ->
43
- Versions = rt :find_version_by_name ([" riak_ts-1.3.1" , " riak_ts_ee-1.3.1" ]),
44
- Vsn131 = maybe_missing_1_3_1 (Versions ),
45
- [{? TS_VERSION_1_3 , Vsn131 } | Config ].
39
+ Config .
46
40
47
41
end_per_suite (_Config ) ->
48
42
ok .
@@ -143,21 +137,19 @@ capability_not_specified_on_one_node_test(_Ctx) ->
143
137
% % Riak TS Capability Tests
144
138
% %--------------------------------------------------------------------
145
139
146
- sql_select_upgrade_a_node_from_1_3_test (Config ) ->
147
- Vsn131 = ? config (? TS_VERSION_1_3 , Config ),
140
+ sql_select_upgrade_a_node_from_legacy_test (_Ctx ) ->
148
141
[Node_A , Node_B , Node_C ] =
149
- rt :deploy_nodes ([Vsn131 , Vsn131 , Vsn131 ]),
142
+ rt :deploy_nodes ([legacy , legacy , legacy ]),
150
143
ok = rt :join_cluster ([Node_A ,Node_B ,Node_C ]),
151
144
ok = rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
152
145
ok = rt :upgrade (Node_A , ? TS_VERSION_CURRENT ),
153
146
ok = rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
154
- ok = rt :wait_until_capability (Node_A , ? SQL_SELECT_CAP , v1 ),
147
+ ok = rt :wait_until_capability (Node_A , ? SQL_SELECT_CAP , v2 ),
155
148
ok .
156
149
157
- sql_select_join_with_all_nodes_upgraded_test (Config ) ->
158
- Vsn131 = ? config (? TS_VERSION_1_3 , Config ),
150
+ sql_select_join_with_all_nodes_upgraded_test (_Ctx ) ->
159
151
[Node_A , Node_B , Node_C ] =
160
- rt :deploy_nodes ([Vsn131 , Vsn131 , Vsn131 ]),
152
+ rt :deploy_nodes ([legacy , legacy , legacy ]),
161
153
ok = rt :join_cluster ([Node_A ,Node_B ,Node_C ]),
162
154
rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
163
155
rt :upgrade (Node_A , ? TS_VERSION_CURRENT ),
@@ -168,18 +160,14 @@ sql_select_join_with_all_nodes_upgraded_test(Config) ->
168
160
rt :wait_until_capability (Node_C , ? SQL_SELECT_CAP , v3 ),
169
161
ok .
170
162
171
- % % This test passed for 1.4.0, expecting v1 where commented, but fails for 1.5.0 due to code change. We set it to expect
172
- % % v3 until future changes are made. After 1.5.0 if this test will fail if new code is introduced to handle capability
173
- % % communication. https://bashoeng.atlassian.net/browse/RTS-1415
174
- sql_select_downgrade_a_node_test (Config ) ->
175
- Vsn131 = ? config (? TS_VERSION_1_3 , Config ),
163
+ sql_select_downgrade_a_node_test (_Ctx ) ->
176
164
[Node_A , Node_B , Node_C ] =
177
- rt :deploy_nodes ([Vsn131 , ? TS_VERSION_CURRENT , ? TS_VERSION_CURRENT ]),
165
+ rt :deploy_nodes ([legacy , ? TS_VERSION_CURRENT , ? TS_VERSION_CURRENT ]),
178
166
ok = rt :join_cluster ([Node_A ,Node_B ,Node_C ]),
179
167
rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
180
168
% rt:wait_until_capability(Node_A, ?SQL_SELECT_CAP, v3),
181
- rt :wait_until_capability (Node_B , ? SQL_SELECT_CAP , v1 ),
182
- rt :wait_until_capability (Node_C , ? SQL_SELECT_CAP , v1 ),
169
+ rt :wait_until_capability (Node_B , ? SQL_SELECT_CAP , v2 ),
170
+ rt :wait_until_capability (Node_C , ? SQL_SELECT_CAP , v2 ),
183
171
rt :upgrade (Node_A , ? TS_VERSION_CURRENT ),
184
172
rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
185
173
rt :wait_until_capability (Node_A , ? SQL_SELECT_CAP , v3 ),
@@ -189,8 +177,8 @@ sql_select_downgrade_a_node_test(Config) ->
189
177
% % pending changes to how capabilities are communicated around the ring, this
190
178
% % section will expect v2. Once capabilities are changed in a future version of riak
191
179
% % (or if testing 1.4.0 as current)
192
- % % the expected version should go back to v1 .
193
- rt :upgrade (Node_A , Vsn131 ),
180
+ % % the expected version should go back to v2 .
181
+ rt :upgrade (Node_A , legacy ),
194
182
rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
195
183
rt :wait_until_capability (Node_B , ? SQL_SELECT_CAP , v3 ),
196
184
rt :wait_until_capability (Node_C , ? SQL_SELECT_CAP , v3 ),
@@ -200,10 +188,9 @@ sql_select_downgrade_a_node_test(Config) ->
200
188
% % Perform queries in mixed version cluster
201
189
% %--------------------------------------------------------------------
202
190
203
- query_in_mixed_version_cluster_test (Config ) ->
204
- Vsn131 = ? config (? TS_VERSION_1_3 , Config ),
191
+ query_in_mixed_version_cluster_test (_Ctx ) ->
205
192
[Node_A , Node_B , Node_C ] =
206
- rt :deploy_nodes ([? TS_VERSION_CURRENT , Vsn131 , ? TS_VERSION_CURRENT ]),
193
+ rt :deploy_nodes ([? TS_VERSION_CURRENT , previous , ? TS_VERSION_CURRENT ]),
207
194
ok = rt :join_cluster ([Node_A ,Node_B ,Node_C ]),
208
195
rt :wait_until_ring_converged ([Node_A ,Node_B ,Node_C ]),
209
196
Table = " grouptab1" ,
@@ -220,7 +207,7 @@ query_in_mixed_version_cluster_test(Config) ->
220
207
[{1 ,1 ,B * C } || B <- lists :seq (1 ,10 ), C <- lists :seq (1000 ,5000 ,1000 )]),
221
208
ExpectedResultSet = [{N } || N <- lists :seq (1000 ,5000 ,1000 )],
222
209
% %
223
- % % Test that the current version can query version 1.3
210
+ % % Test that the current version can query older version
224
211
% %
225
212
Query =
226
213
" SELECT c FROM grouptab1 "
@@ -232,17 +219,11 @@ query_in_mixed_version_cluster_test(Config) ->
232
219
{ok ,{Cols , Rows }}
233
220
),
234
221
% %
235
- % % Test that the 1.3 can query the current version
222
+ % % Test that the previous can query the current version
236
223
% %
237
224
{ok , {Cols , Rows }} = run_query (rt :pbc (Node_B ), Query ),
238
225
ts_data :assert_row_sets (
239
226
{rt_ignore_columns , ExpectedResultSet },
240
227
{ok ,{Cols , Rows }}
241
228
).
242
229
243
- % % If 1.3.1 is not found, use a meaningful atom to prompt the error message
244
- % % rtdev:check_version/1
245
- maybe_missing_1_3_1 ([]) ->
246
- missing_version_ts_1_3_1 ;
247
- maybe_missing_1_3_1 ([Vsn ]) ->
248
- Vsn .
0 commit comments