mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-07 08:58:52 +00:00
b11db0d74e
* install a riak_sysmon custom handler and monitor for the busy_dist_port event on the riak node. when the handler detects the event it notifies the test process * install riak_test_lager_backend on the riak node to capture log messages in memory. When the test process is notified that the busy dist port event fired on the riak node it retrieves the logs from the backend using the added get_logs/0 function and then checks for the busy_dist_port message * there is a subtle race I *think*, that should rarely come up in practice, between lager and the riak_sysmon event handlers with this method of implementing the test that may require use of some form of retry/max retry still
32 lines
1.1 KiB
Erlang
32 lines
1.1 KiB
Erlang
%% -------------------------------------------------------------------
|
|
%%
|
|
%% cause_bdp - helper module used by verify_busy_dist_port
|
|
%%
|
|
%% Copyright (c) 2012 Basho Technologies, Inc.
|
|
%%
|
|
%% This file is provided to you under the Apache License,
|
|
%% Version 2.0 (the "License"); you may not use this file
|
|
%% except in compliance with the License. You may obtain
|
|
%% a copy of the License at
|
|
%%
|
|
%% http://www.apache.org/licenses/LICENSE-2.0
|
|
%%
|
|
%% Unless required by applicable law or agreed to in writing,
|
|
%% software distributed under the License is distributed on an
|
|
%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
%% KIND, either express or implied. See the License for the
|
|
%% specific language governing permissions and limitations
|
|
%% under the License.
|
|
%%
|
|
%% -------------------------------------------------------------------
|
|
|
|
-module(cause_bdp).
|
|
-compile(export_all).
|
|
|
|
spam_nodes(TargetNodes) ->
|
|
[[spawn(?MODULE, spam, [N]) || _ <- lists:seq(1,10*1000)] || N <- TargetNodes].
|
|
|
|
spam(Node) ->
|
|
timer:sleep(random:uniform(1500)),
|
|
catch rpc:call(Node, erlang, whereis, [rex]).
|