Commit Graph

1619 Commits

Author SHA1 Message Date
Jared Morrow
499a4136f4 Fix meck to a tag 2014-05-09 09:13:19 -06:00
Kelly McLaughlin
acd0f3fbe6 Merge branch 'bugfix/verify-busy-dist-port-hang' 2014-05-08 16:18:43 -06:00
Christopher Meiklejohn
de0f50fd86 Merge pull request #597 from basho/bugfix/csm/riak_control
Resolve riak_control failures.
2014-05-08 12:40:43 -04:00
Christopher Meiklejohn
32b6a598e9 Resolve riak_control failures.
Resolve failures with cuttlefish configuration changes in Riak 2.0.

Remove riak_control_upgrade, since riak_control should cover those use
cases completely.
2014-05-08 12:40:13 -04:00
Kelly McLaughlin
0de33c7b66 Resolve issue with verify_busy_dist_port test hanging indefinitely
The verify_busy_dist_port helper function cause_bdp:spam_nodes/1
recently changed to be more aggressive in triggering busy_dist_port
warnings. The function changed to spawn 1 million processes to ensure
the test generated enough activity to trigger the warnings, but that
number of processes exceeds the 256 thousand process limit that is the
Riak default. One consequence of this can be that the rex server
responsible for handling rpc calls can crash. In some cases this leads
to rpc calls by riak_test to shutdown the riak nodes involved in the
test to hang indefinitely. This change reduces the number of processes
spawned to 200 thousand. This should still be enough processes to
trigger the busy_dist_port warnings, but without exceeding the beam
process limit.
2014-05-06 14:40:47 -06:00
Joe DeVivo
9fa3ee50da Merge pull request #572 from basho/bugfix/jd/replication2_pg_intercepts
Complete update of replication2_pg test for rtcloud
2014-05-01 15:43:16 -06:00
Joe DeVivo
ffadda64a2 Fixed all hardcoded references to 127.0.0.1 in replication2_pg 2014-05-01 15:38:02 -06:00
Joe DeVivo
004de13036 potential fix for replication2_pg:test_mixed_pg_ssl 2014-05-01 15:38:02 -06:00
Joe DeVivo
60036e57f4 replication2_pg fixes for rtcloud 2014-05-01 15:30:32 -06:00
Joe DeVivo
18d1192c66 rtssh changes to fix riak attach and friends 2014-05-01 15:30:31 -06:00
Steve Vinoski
2a2b72745a Merge pull request #570 from basho/vinoski/anon-intercept
support for anonymous function intercepts
2014-04-25 15:14:04 -04:00
Steve Vinoski
fbbacdd0b3 support for anonymous function intercepts
Allow intercept functions passed to rt_intercept:add/2 to be anonymous. In
compiled code they can either be a plain anonymous function, assuming they
don't use any variables from the surrounding context, or they can be a
2-tuple like this:

{[FreeVar1, ...],
 fun(Arg1, ...) -> ... end}

where FreeVar1 etc. is a list of free variables to be closed over so that
they can be used within the anonymous function. For making interactive
calls to rt_intercept:add/2 from the Erlang shell, only the anonymous
function form is required, even if it uses free variables, though the
2-tuple form is also acceptable.

For compiled code, support for anonymous intercept functions is implemented
via a parse transform, and so to use anonymous functions the intercept
structure(s) containing them must be defined directly inline as part of the
final argument to rt_intercept:add/2, i.e., they cannot be first assigned
to a variable that is then used within the argument. This is because the
value of such a variable might not be visible to the parse transform.

Add a description of anonymous function intercepts to the README.
2014-04-25 15:07:02 -04:00
Kelly McLaughlin
f9cf5f840c Merge branch 'bugfix/repl-upgrade-wait-for-rt-conn' 2014-04-25 08:30:46 -06:00
Kelly McLaughlin
2e0991f9e2 Merge branch 'bugfix/verify-counter-capabilities-failure' 2014-04-24 22:02:43 -06:00
Kelly McLaughlin
e2a1ccd653 Wait for realtime connections after node upgrades in replication tests
Prior to Riak 1.4.8 replication registers as a service prior to
completing all initialization tasks including establishing realtime
connections to sink clusters. This leads to a race condition in the
replication_upgrade and replication2_upgrade tests where the test may
begin writing data to the source cluster to verify the function of
realtime replication before the most recently upgraded node
establishes a connection to the sink cluster. The result of this is
that the data is silently discarded by the realtime replication system
and the test fails because all of the expected data is not replicated
and able to be read on the sink cluster. Change the
replication_upgrade and replication2_upgrade tests to explicitly wait
for the realtime connection to be established after each source
cluster node is upgraded before proceeding with the test.
2014-04-24 21:43:05 -06:00
Christopher Meiklejohn
bd0721ec32 Merge pull request #588 from basho/feature/csm/repl-stats-1
Add basic moving target stats test.
2014-04-24 12:00:02 +01:00
Christopher Meiklejohn
20fb678e17 Merge pull request #587 from basho/feature/csm/downgrade-rt
Refactor test to assert downgrade.
2014-04-24 11:19:01 +01:00
Kelly McLaughlin
c5cab6a2b2 Merge branch 'bugfix/replication2-pg-test-pg-proxy' 2014-04-23 14:56:56 -06:00
Kelly McLaughlin
6bb72e2747 Avoid failure in verify_counter_capabilities after node upgrade
Establish a new PB connection to the legacy node after it is upgraded
in order to avoid a failure. The PB connection may close if the node
upgrade takes too long and its reuse in such a case can lead to test
failure because use of the pid returns {error, disconnected} errors.
2014-04-23 09:49:15 -06:00
Steve Vinoski
18dee388ec Merge pull request #590 from basho/vinoski/bash-completion
improve riak_test bash completion
2014-04-23 11:18:44 -04:00
Kelly McLaughlin
274fc6648b Merge branch 'er/verify_dt_upgrade' 2014-04-23 06:57:32 -06:00
Kelly McLaughlin
f045c2e093 Call verify_counters during the upgrade 2014-04-23 06:55:06 -06:00
Steve Vinoski
df7157f642 improve riak_test bash completion
Add missing riak_test options. Allow completion to work if riak_test is
invoked as ./riak_test or a similar pathname. Change the grep for "confirm"
to "confirm/0", which should be found in a test module export, so it
doesn't accidentally catch the plain word "confirm" in a comment in a
module that shouldn't be part of the testname completion. The
_get_comp_words_by_ref helper function is not available by default on OS X,
so add code to compensate for that case. Use a local variable to capture
the grep output, rather than overwriting a global variable.
2014-04-22 20:17:46 -04:00
Kelly McLaughlin
48972b58a6 Merge branch 'bugfix/rt-rpc-fixes' 2014-04-22 07:13:17 -06:00
Kelly McLaughlin
5fd64a98e8 s/badprc/badrpc 2014-04-22 06:46:23 -06:00
Kelly McLaughlin
9d2c2c3997 Fix refactoring bug in wait_until_all_members function 2014-04-22 06:38:36 -06:00
Kelly McLaughlin
20c0b76c3f Change rpc handling in rt module to handle badrpc returns
Change how the return from some rpc calls is handled in the rt module
in order to avoid spurious or misleading test failures.
2014-04-22 06:38:36 -06:00
Christopher Meiklejohn
09f7f88776 Add basic moving target stats test.
Use this as a platform to start testing reports of missing stats from
replication.
2014-04-22 10:38:33 +01:00
Joe DeVivo
3455d26c71 Merge pull request #580 from basho/bugfix/jd/rtssh-set-backend
./riak_test -b backend now works with rtcloud
2014-04-20 11:50:59 -07:00
Christopher Meiklejohn
764f394251 Merge pull request #582 from basho/bugfix/replication2-nval1-request-failure
Wait for transfers to complete in replication2_pg:test_pg_proxy
2014-04-20 17:50:38 +01:00
Christopher Meiklejohn
07b91fab36 Refactor test to assert downgrade.
When performing the test of object reformatting through replication,
assert that if we happen to downgrade the format we can still read the
keys which have been replicated.
2014-04-20 16:09:43 +00:00
Kelly McLaughlin
823dd2fe9c Wait for transfers to complete in replication2_pg:test_pg_proxy
Wait for transfers to complete in
replication2_pg:test_pg_proxy. Replication tests that test the n_val=1
request option can fail with insufficient_vnodes errors if the cluster
setup does not include waiting for transfers to complete. Change the
test_pg_proxy test case to wait until transfers complete on the "A"
and "B" clusters before proceeding.
2014-04-17 11:05:41 -06:00
Kelly McLaughlin
be61a1c338 Fix an error that can lead to failure of tests using replication2_pg
Fix an error that can lead to failure of tests using
replication2_pg:test_pg_proxy test case. A protocol buffers connection
is established to a node in the "B" cluster, the leader node from that
cluster is shut down, and then that protocol buffers connection is
used to exercise proxy_get. If the connection was established to the
former leader and that is subsequently shut down it can cause the test
to stall and eventually fail. This changes that test to establish a
new connection to a node remaining in the "B" cluster to use for the
proxy_get and prevents the test from stalling.
2014-04-16 17:38:18 -06:00
Joe DeVivo
7a48a7be20 ./riak_test -b backend now works with rtcloud 2014-04-16 16:33:52 -07:00
Andrew Thompson
9998807bc8 Merge pull request #560 from basho/adt-add-logging
Add a log/test.log that mirrors the console output
2014-04-16 17:32:24 -04:00
Andrew Thompson
a68559adc2 Merge pull request #574 from basho/adt-fix-cover
Shutdown cover when setup_harness is run
2014-04-16 17:32:11 -04:00
John Daily
aa91baf273 Merge pull request #549 from basho/jrd-bucket-types-naming
Update tests for UTF-8 bucket types (and buckets)
2014-04-16 11:59:59 -04:00
Jared Morrow
76cc312f31 Change previous riak release to 1.4.8 rather than 1.4.2 2014-04-16 07:29:55 -06:00
Kelly McLaughlin
8e5705595a Merge branch 'bugfix/consistent-object-filter-test-fix' 2014-04-15 15:40:31 -06:00
Kelly McLaughlin
5b66c7a354 Add n_val to bucket type specificaitons 2014-04-15 15:08:23 -06:00
Kelly McLaughlin
75f5165078 Fix bug with assigment of LeaderB 2014-04-15 15:08:04 -06:00
Andrew J. Stone
8246b1a090 Force update ring in ensemble_util:build_cluster()
Once riak_ensemble_manager:enable() is called, we need to call
riak_core_ring_manager:force_update() so that the members will be
created and added to the ensembles trying to get a quorum. During ticks
in core, new members are created only if the ring has changed. There is
a race that can sometimes prevent the members from starting and thus the
quorum from being achieved indefinitely. This small change to the test
infrastructure resolves this issue, but it still requires fixing in
riak_core and/or riak_kv.
2014-04-15 16:06:47 -04:00
Andrew J. Stone
d0c7f2998e Call riak_core_manager:force_update() in test
repl_consistent_object_filter calls riak_ensemble_manager:enable() which
fails to bootstrap the ensemble because the ring has stabilized already.
An issue for this will be opened in riak_kv, but this quick fix will
allow the test to get beyond that point.
2014-04-15 15:49:36 -04:00
Kelly McLaughlin
aca372d627 Initial refactoring to use ensemble_util 2014-04-14 14:09:13 -06:00
Joseph Blomstedt
53e339c913 Merge pull request #573 from basho/jdb-ensemble-sync 2014-04-11 09:39:22 -07:00
Kelly McLaughlin
1651adbd36 Merge branch 'bugfix/fix-verify-busy-dist-port' 2014-04-11 09:14:32 -06:00
Andrew Thompson
b782127edb Shutdown cover when setup_harness is run 2014-04-11 10:23:36 -04:00
Joseph Blomstedt
da7b81b7b3 Merge pull request #569 from basho/jdb-ensemble-overhaul 2014-04-10 23:50:08 -07:00
Joseph Blomstedt
ab5a4a6e4a Add additional ensemble tests to test peer syncing
Add ensemble_basic4, ensemble_sync, and ensemble_interleave tests.

ensemble_sync tests the new AAE-based peer syncing logic. The test
checks various scenarios with different levels of data corruption.

ensemble_interleave tests a specific scenario where two peers become
corrupted one after the other. This tests the scenario where the
second peer becomes untrusted while the first peer may be syncing
with it.
2014-04-10 19:07:02 -07:00
John R. Daily
42265b9d43 Remove unnecessary sleep per @jrwest 2014-04-10 21:53:32 -04:00