Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split tests #53

Merged
merged 30 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cc2aee7
Add cets_test_node/cets_test_rpc helpers
arcusfelis Mar 12, 2024
72cf27b
Add cets_test_setup helper
arcusfelis Mar 12, 2024
d994f1a
Move setup functions into cets_test_setup
arcusfelis Mar 12, 2024
ff5777d
Move wait helpers to cets_test_wait
arcusfelis Mar 12, 2024
4445987
Move wait_till_test_stage/wait_till_message_queue_length into cets_te…
arcusfelis Mar 12, 2024
c4f5a00
Create cets_test_receive helper
arcusfelis Mar 12, 2024
616243c
Move make_process() into cets_test_setup
arcusfelis Mar 12, 2024
2c9130e
Move test cases into cets_disco_SUITE
arcusfelis Mar 12, 2024
28b67f8
Move small disco cases into disco suite
arcusfelis Mar 12, 2024
3baa846
Move cases into cets_status_SUITE
arcusfelis Mar 12, 2024
9dfdb28
Move more cases into cets_disco_SUITE
arcusfelis Mar 12, 2024
9c9ff72
Move receive_all_logs/ssert_nothing_is_logged into cets_test_log
arcusfelis Mar 12, 2024
3f9e50a
Move unknown_message_is_ignored_in_disco_process/code_change_returns_…
arcusfelis Mar 12, 2024
79bea51
Cleanup cets_status_SUITE
arcusfelis Mar 12, 2024
9f4db45
Use cets_test_peer:start/2 everywhere
arcusfelis Mar 12, 2024
a87e6d5
Make cets_join_SUITE
arcusfelis Mar 12, 2024
45b1f7f
Move more tests into cets_join_SUITE
arcusfelis Mar 12, 2024
fa821f0
Move move cases into cets_join_SUITE
arcusfelis Mar 12, 2024
53cda77
Move join_interrupted_when_ping_crashes
arcusfelis Mar 12, 2024
19fba2f
Move tests into cets_netsplit_SUITE
arcusfelis Mar 12, 2024
c19a3c4
Move start_link_local test
arcusfelis May 9, 2024
e3ad79c
Debug tests
arcusfelis May 9, 2024
a211b72
Add 10 seconds timetrap
arcusfelis May 10, 2024
07839a6
Use init:stop() to stop peers in tests
arcusfelis May 10, 2024
0d98f74
Monitorr stopping peers
arcusfelis May 13, 2024
b9908fc
Reuse nodes in cets_test_peer
arcusfelis May 14, 2024
6492e60
Remove unused imports
arcusfelis May 16, 2024
5f6d948
Move servers_remove_each_other_if_join_refs_do_not_match_after_unpause
arcusfelis May 16, 2024
0209ac8
Remove unused imports
arcusfelis May 16, 2024
06d99a8
Rename disconnect_node_by_name to disconnect_node_by_id
arcusfelis May 16, 2024
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
2,077 changes: 62 additions & 2,015 deletions test/cets_SUITE.erl

Large diffs are not rendered by default.

772 changes: 772 additions & 0 deletions test/cets_disco_SUITE.erl

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions test/cets_dist_blocker_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,10 @@ unknown_cases() ->
].

init_per_suite(Config) ->
Names = [peer_ct2],
{Nodes, Peers} = lists:unzip([cets_test_peer:start_node(N) || N <- Names]),
[
{nodes, maps:from_list(lists:zip(Names, Nodes))},
{peers, maps:from_list(lists:zip(Names, Peers))}
| Config
].
cets_test_peer:start([ct2], Config).

end_per_suite(Config) ->
cets_test_peer:stop(Config),
Config.

init_per_group(_Group, Config) ->
Expand All @@ -64,7 +59,7 @@ end_per_testcase(_, _Config) ->
%% Test blocking functionality

waits_for_cleaning(Config) ->
#{peer_ct2 := Node2} = proplists:get_value(nodes, Config),
#{ct2 := Node2} = proplists:get_value(nodes, Config),
{ok, Blocker} = cets_dist_blocker:start_link(),
cets_dist_blocker:add_cleaner(self()),
connect_and_disconnect(Node2),
Expand All @@ -75,7 +70,7 @@ waits_for_cleaning(Config) ->
gen_server:stop(Blocker).

unblocks_if_cleaner_goes_down(Config) ->
#{peer_ct2 := Node2} = proplists:get_value(nodes, Config),
#{ct2 := Node2} = proplists:get_value(nodes, Config),
{ok, Blocker} = cets_dist_blocker:start_link(),
Cleaner = spawn_cleaner(),
connect_and_disconnect(Node2),
Expand All @@ -86,7 +81,7 @@ unblocks_if_cleaner_goes_down(Config) ->
gen_server:stop(Blocker).

unblocks_if_cleaner_goes_down_and_second_cleaner_says_done(Config) ->
#{peer_ct2 := Node2} = proplists:get_value(nodes, Config),
#{ct2 := Node2} = proplists:get_value(nodes, Config),
{ok, Blocker} = cets_dist_blocker:start_link(),
%% Two cleaners
cets_dist_blocker:add_cleaner(self()),
Expand All @@ -101,7 +96,7 @@ unblocks_if_cleaner_goes_down_and_second_cleaner_says_done(Config) ->
gen_server:stop(Blocker).

unblocks_if_cleaner_says_done_and_second_cleaner_goes_down(Config) ->
#{peer_ct2 := Node2} = proplists:get_value(nodes, Config),
#{ct2 := Node2} = proplists:get_value(nodes, Config),
{ok, Blocker} = cets_dist_blocker:start_link(),
%% Two cleaners
cets_dist_blocker:add_cleaner(self()),
Expand All @@ -117,7 +112,7 @@ unblocks_if_cleaner_says_done_and_second_cleaner_goes_down(Config) ->
gen_server:stop(Blocker).

blocks_if_cleaner_says_done_and_second_cleaner_does_not_ack(Config) ->
#{peer_ct2 := Node2} = proplists:get_value(nodes, Config),
#{ct2 := Node2} = proplists:get_value(nodes, Config),
{ok, Blocker} = cets_dist_blocker:start_link(),
%% Two cleaners
cets_dist_blocker:add_cleaner(self()),
Expand All @@ -131,7 +126,7 @@ blocks_if_cleaner_says_done_and_second_cleaner_does_not_ack(Config) ->
gen_server:stop(Blocker).

skip_blocking_if_no_cleaners(Config) ->
#{peer_ct2 := Node2} = proplists:get_value(nodes, Config),
#{ct2 := Node2} = proplists:get_value(nodes, Config),
{ok, Blocker} = cets_dist_blocker:start_link(),
pong = net_adm:ping(Node2),
true = erlang:disconnect_node(Node2),
Expand Down
Loading
Loading