Skip to content

Commit e2408e1

Browse files
committed
wip
1 parent 5aa0192 commit e2408e1

File tree

10 files changed

+25
-21
lines changed

10 files changed

+25
-21
lines changed

rebar.config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{require_otp_vsn, "R16|17|18|19|20"}.
1+
{minimum_otp_vsn, "20"}.
22
{cover_enabled, true}.
33
{edoc_opts, [{preprocess, true}]}.
44
%%{edoc_opts, [{doclet, edown_doclet}, {pretty_printer, erl_pp}]}.
@@ -26,6 +26,8 @@
2626
{escript_incl_apps, [goldrush, lager, getopt, riakhttpc, riakc, ibrowse, mochiweb, kvc, kv_index_tictactree]}.
2727
{escript_emu_args, "%%! -escript main riak_test_escript +K true +P 10000 -env ERL_MAX_PORTS 10000\n"}.
2828

29+
{extra_src_dirs, ["tests"]}.
30+
2931
{post_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)",
3032
escriptize,
3133
"cp \"$REBAR_BUILD_DIR/bin/riak_test\" ./riak_test"},

tests/jmx_verify.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test_supervision() ->
128128
case net_adm:ping(Node) of
129129
pang ->
130130
lager:error("riak_jmx crash able to crash riak node"),
131-
?assertEqual("riak_jmx crash able to crash riak node", true);
131+
?assert(false, "riak_jmx crash able to crash riak node");
132132
_ ->
133133
yay
134134
end,
@@ -186,7 +186,7 @@ test_application_stop() ->
186186
case net_adm:ping(Node) of
187187
pang ->
188188
lager:error("riak_jmx stop takes down riak node"),
189-
?assertEqual("riak_jmx stop takes down riak node", true);
189+
?assert(false, "riak_jmx stop takes down riak node");
190190
_ ->
191191
yay
192192
end,
@@ -225,4 +225,4 @@ jmx_dump(Cmd) ->
225225
lager:info("Dumping JMX stats using command ~s", [Cmd]),
226226
Output = string:strip(os:cmd(Cmd), both, $\n),
227227
JSONOutput = mochijson2:decode(Output),
228-
[ {Key, Value} || {struct, [{Key, Value}]} <- JSONOutput].
228+
[ {Key, Value} || {struct, [{Key, Value}]} <- JSONOutput].

tests/loaded_upgrade.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ upgrade_recv_loop(EndTime) ->
9494
_ ->
9595
receive
9696
{mapred, Node, bad_result} ->
97-
?assertEqual(true, {mapred, Node, bad_result});
97+
?assert(false, {mapred, Node, bad_result});
9898
{kv, Node, not_equal} ->
99-
?assertEqual(true, {kv, Node, bad_result});
99+
?assert(false, {kv, Node, bad_result});
100100
{kv, Node, {notfound, Key}} ->
101-
?assertEqual(true, {kv, Node, {notfound, Key}});
101+
?assert(false, {kv, Node, {notfound, Key}});
102102
{listkeys, Node, not_equal} ->
103-
?assertEqual(true, {listkeys, Node, not_equal});
103+
?assert(false, {listkeys, Node, not_equal});
104104
Msg ->
105105
lager:debug("Received Mesg ~p", [Msg]),
106106
upgrade_recv_loop(EndTime)

tests/overload.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
-compile([export_all, nowarn_export_all]).
2222
-include_lib("eunit/include/eunit.hrl").
2323

24+
-no_auto_import([overload]).
25+
2426
-cover_modules([riak_kv_vnode,
2527
riak_kv_ensemble_backend,
2628
riak_core_vnode_proxy]).

tests/pb_cipher_suites.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ pb_connection_info(Port, Config) ->
219219
{ok, PB} = riakc_pb_socket:start("127.0.0.1", Port, Config),
220220
?assertEqual(pong, riakc_pb_socket:ping(PB)),
221221

222-
ConnInfo = ssl:connection_info(pb_get_socket(PB)),
222+
ConnInfo = ssl:connection_information(pb_get_socket(PB)),
223223

224224
riakc_pb_socket:stop(PB),
225225
ConnInfo.

tests/replication2_pg.erl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ test_basic_pg(Mode, SSL) ->
182182
rt:pbc_write(PidA, Bucket, KeyA, ValueA),
183183
rt:pbc_write(PidA, Bucket, KeyB, ValueB),
184184

185-
_FirstA = hd(ANodes),
185+
_ = hd(ANodes),
186186
FirstB = hd(BNodes),
187187
FirstC = hd(CNodes),
188188
PidB = rt:pbc(FirstB),
@@ -286,9 +286,9 @@ test_12_pg(Mode, SSL) ->
286286
{Bucket, KeyB, ValueB} = make_test_object("b"),
287287

288288
rt:log_to_nodes(AllNodes, "Test 1.2 proxy_get"),
289-
_FirstA = hd(ANodes),
289+
_ = hd(ANodes),
290290
FirstB = hd(BNodes),
291-
_FirstC = hd(CNodes),
291+
_ = hd(CNodes),
292292
case Mode of
293293
mode_repl12 ->
294294
ModeRes = rpc:call(FirstB, riak_repl_console, modes, [["mode_repl12"]]),
@@ -406,7 +406,7 @@ test_pg_proxy(SSL) ->
406406
%% before it actually does any work.
407407
FirstA = hd(ANodes),
408408
FirstB = hd(BNodes),
409-
_FirstC = hd(CNodes),
409+
_ = hd(CNodes),
410410
PidB = rt:pbc(FirstB),
411411
lager:info("Connected to cluster B"),
412412
{ok, PGResult} = riak_repl_pb_api:get(PidB,Bucket,KeyA,CidA),
@@ -453,7 +453,7 @@ test_cluster_mapping(SSL) ->
453453
{LeaderA, ANodes, BNodes, CNodes, _AllNodes} =
454454
setup_repl_clusters(Conf, SSL),
455455

456-
_FirstA = hd(ANodes),
456+
_ = hd(ANodes),
457457
FirstB = hd(BNodes),
458458
FirstC = hd(CNodes),
459459
LeaderB = rpc:call(FirstB, riak_core_cluster_mgr, get_leader, []),
@@ -576,7 +576,7 @@ test_bidirectional_pg(SSL) ->
576576

577577
FirstA = hd(ANodes),
578578
FirstB = hd(BNodes),
579-
_FirstC = hd(CNodes),
579+
_ = hd(CNodes),
580580

581581
LeaderB = rpc:call(FirstB, riak_repl2_leader, leader_node, []),
582582

@@ -677,7 +677,7 @@ test_multiple_sink_pg(SSL) ->
677677
rt:pbc_write(PidA, Bucket, KeyA, ValueA),
678678
rt:pbc_write(PidA, Bucket, KeyB, ValueB),
679679

680-
_FirstA = hd(ANodes),
680+
_ = hd(ANodes),
681681
FirstB = hd(BNodes),
682682
FirstC = hd(CNodes),
683683

@@ -730,7 +730,7 @@ test_mixed_pg(SSL) ->
730730
rt:pbc_write(PidA, Bucket, KeyB, ValueB),
731731
rt:pbc_write(PidA, Bucket, KeyC, ValueC),
732732

733-
_FirstA = hd(ANodes),
733+
_ = hd(ANodes),
734734
FirstB = hd(BNodes),
735735
FirstC = hd(CNodes),
736736
rt:wait_until_ring_converged(ANodes),

tests/verify_2i_aae.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ run_2i_repair(Node1) ->
179179
after
180180
MaxWaitTime ->
181181
lager:error("Timed out (~pms) waiting for 2i AAE repair process", [MaxWaitTime]),
182-
?assertEqual(aae_2i_repair_complete, aae_2i_repair_timeout)
182+
?assert(false, {aae_2i_repair_complete,aae_2i_repair_timeout})
183183
end.
184184

185185
set_skip_index_specs(Node, Val) ->

tests/verify_aae.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ verify_data(Node, KeyValues) ->
207207
lager:info("Data is now correct. Yay!");
208208
fail ->
209209
lager:error("AAE failed to fix data"),
210-
?assertEqual(aae_fixed_data, aae_failed_to_fix_data)
210+
?assert(false, aae_failed_to_fix_data)
211211
end,
212212
riakc_pb_socket:stop(PB),
213213
ok.

tests/verify_counter_repl.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ verify_counter(ExpectedValue, Node) ->
8989
ExpectedValue == get_counter(Node).
9090

9191
rand_amt() ->
92-
crypto:rand_uniform(-100, 100).
92+
-100 + rand:uniform(100*2).
9393

9494
%% Set up bi-directional full sync replication.
9595
repl_power_activate(ClusterA, ClusterB) ->

tests/verify_tictac_aae.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ verify_data(Node, KeyValues) ->
220220
lager:info("Data is now correct. Yay!");
221221
fail ->
222222
lager:error("AAE failed to fix data"),
223-
?assertEqual(aae_fixed_data, aae_failed_to_fix_data)
223+
?assert(false, aae_failed_to_fix_data)
224224
end,
225225
riakc_pb_socket:stop(PB),
226226
ok.

0 commit comments

Comments
 (0)