Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
sudo apt update
sudo apt install emacs-nox
- name: Install Erlang/OTP
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: '28.1.1'
rebar3-version: '3.25.1'
Expand Down Expand Up @@ -47,12 +47,13 @@ jobs:
fail-fast: false
matrix:
include:
- otp-version: '29.0-rc3'
- otp-version: '28.1.1'
- otp-version: '27.3.4.6'
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Install Erlang/OTP
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: ${{ matrix.otp-version }}
rebar3-version: '3.25.1'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/db-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
packages: redis-server
version: 1.0
- name: Install Erlang/OTP
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: '28.1.1'
rebar3-version: '3.25.1'
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
packages: redis-server faketime
version: 1.0
- name: Install Erlang/OTP
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: '28.1.1'
rebar3-version: '3.25.1'
Expand Down
6 changes: 4 additions & 2 deletions src/ered_cluster.erl
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,10 @@ handle_info(_Ignore, State) ->
{noreply, State}.

terminate(Reason, State) ->
catch [ered_client_sup:stop_client(State#st.client_sup, Pid)
|| Pid <- maps:values(State#st.nodes)],
try [ered_client_sup:stop_client(State#st.client_sup, Pid)
|| Pid <- maps:values(State#st.nodes)]
catch _:_ -> ok
end,
ered_info_msg:cluster_stopped(State#st.info_pid, Reason).

code_change(_OldVsn, State = #st{}, _Extra) ->
Expand Down
7 changes: 5 additions & 2 deletions test/ered_cluster_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ init_per_suite(_Config) ->

init_per_testcase(_Testcase, Config) ->
%% Quick check that cluster is OK; otherwise restart everything.
case catch ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of
try ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of
ok ->
[];
_ ->
_ -> % Cluster inconsistent but all nodes reachable.
ct:pal("Re-initialize the cluster"),
init_per_suite(Config)
catch _:_ -> % One or more nodes unreachable.
ct:pal("Re-initialize the cluster"),
Comment thread
bjosv marked this conversation as resolved.
Outdated
init_per_suite(Config)
end.
Expand Down
7 changes: 5 additions & 2 deletions test/ered_cluster_tls_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ init_per_testcase(_Testcase, Config) ->
generate_client_cert(),

%% Quick check that cluster is OK; otherwise restart everything.
case catch ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of
try ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of
ok ->
[];
_ ->
_ -> % Cluster inconsistent but all nodes reachable.
ct:pal("Re-initialize the cluster"),
init_per_suite(Config)
catch _:_ -> % One or more nodes unreachable.
ct:pal("Re-initialize the cluster"),
init_per_suite(Config)
end.
Expand Down
Loading