Skip to content

Commit e77f88a

Browse files
committed
Add test peer and test peer set modules.
1 parent f4f63da commit e77f88a

12 files changed

+1125
-65
lines changed

apps/merge_raft/src/merge_raft.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
"GitHub" => "https://github.com/WhatsApp/merge_raft"
7070
}},
7171
{pkg_name, "merge_raft"}
72-
]}.
72+
]}.

apps/merge_raft_test/rebar.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[{<<"proper">>,
2+
{git,"https://github.com/proper-testing/proper.git",
3+
{ref,"db4ac35639e0ce8504ff3f07517dae49412a8674"}},
4+
0}].

apps/merge_raft_test/src/merge_raft_test.app.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
{application, merge_raft_test, [
2626
{description, "merge_raft_test: test modules for merge_raft"},
2727
{vsn, "1.0.0"},
28+
{mod, {merge_raft_test_app, []}},
2829
{modules, []},
2930
{registered, []},
3031
%% NOTE: Remember to sync changes to `applications` to

apps/merge_raft_test/src/merge_raft_test.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@
9696
%%%=============================================================================
9797

9898
-spec dynamic_cast(term()) -> dynamic().
99-
dynamic_cast(X) -> X.
99+
dynamic_cast(X) -> X.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
%%%-----------------------------------------------------------------------------
2+
%%% %CopyrightBegin%
3+
%%%
4+
%%% SPDX-License-Identifier: Apache-2.0
5+
%%%
6+
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
7+
%%% Copyright (c) WhatsApp LLC
8+
%%%
9+
%%% Licensed under the Apache License, Version 2.0 (the "License");
10+
%%% you may not use this file except in compliance with the License.
11+
%%% You may obtain a copy of the License at
12+
%%%
13+
%%% http://www.apache.org/licenses/LICENSE-2.0
14+
%%%
15+
%%% Unless required by applicable law or agreed to in writing, software
16+
%%% distributed under the License is distributed on an "AS IS" BASIS,
17+
%%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
%%% See the License for the specific language governing permissions and
19+
%%% limitations under the License.
20+
%%%
21+
%%% %CopyrightEnd%
22+
%%%-----------------------------------------------------------------------------
23+
%%% % @format
24+
-module(merge_raft_test_app).
25+
-moduledoc """
26+
""".
27+
-moduledoc #{author => ["Andrew Bennett <[email protected]>"]}.
28+
-moduledoc #{created => "2025-08-26", modified => "2025-08-26"}.
29+
-moduledoc #{copyright => "Meta Platforms, Inc. and affiliates."}.
30+
-compile(warn_missing_spec_all).
31+
-oncall("whatsapp_clr").
32+
33+
-behaviour(application).
34+
35+
%% application callbacks
36+
-export([
37+
start/2,
38+
stop/1
39+
]).
40+
41+
%%%=============================================================================
42+
%%% application callbacks
43+
%%%=============================================================================
44+
45+
-spec start(StartType, StartArgs) -> {ok, Pid} | {ok, Pid, State} | {error, Reason} when
46+
StartType :: application:start_type(),
47+
StartArgs :: term(),
48+
Pid :: pid(),
49+
State :: term(),
50+
Reason :: term().
51+
start(_StartType, _StartArgs) ->
52+
{ok, SupPid} = merge_raft_test_sup:start_link(),
53+
{ok, SupPid}.
54+
55+
-spec stop(State) -> Ignored when
56+
State :: term(),
57+
Ignored :: term().
58+
stop(_State) ->
59+
ok.
60+
61+
%%%-----------------------------------------------------------------------------
62+
%%% Internal functions
63+
%%%-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)