2222 ]).
2323
2424-export ([
25- proper_check_create /1
25+ proper_new_ring_is_empty /1
2626 ]).
2727
2828-include (" epocxy_common_test.hrl" ).
3333-spec all () -> [test_case () | {group , test_group ()}].
3434
3535all () -> [
36- proper_check_create % Ensure we can create new rings
36+ proper_new_ring_is_empty % Ensure we can create new rings
3737 ].
3838
3939% % -spec groups() -> [test_group(), [sequence], [test_case() | {group, test_group()}]].
@@ -70,17 +70,17 @@ end_per_testcase (_Test_Case, Config) -> Config.
7070gen_ring_names () ->
7171 ? LET (Ring_Names , list (atom ()), Ring_Names ).
7272
73- % % Validate any atom can be used as a ring_name and list will report properly .
73+ % % Validate any atom can be used as a ring_name and ring is empty by default .
7474-spec proper_check_create (config ()) -> ok .
75- proper_check_create (_Config ) ->
75+ proper_new_ring_is_empty (_Config ) ->
7676 {ok , Sup_Pid } = epocxy_sup :start_link (),
7777 Fsm_Pid = whereis (epocxy_ets_fsm ),
7878
7979 ct :log (" Test using an atom as a ring name" ),
8080 Test_Ring_Name = ? FORALL (Names , gen_ring_names (),
8181 case [N || N <- Names , N =/= '' ] of
8282 [] -> true ;
83- Ring_Names -> check_create_test (Ring_Names , Sup_Pid , Fsm_Pid )
83+ Ring_Names -> check_empty_create (Ring_Names , Sup_Pid , Fsm_Pid )
8484 end ),
8585 true = proper :quickcheck (Test_Ring_Name , ? PQ_NUM (5 )),
8686 ct :comment (" Successfully tested atoms as ring_names" ),
@@ -89,16 +89,14 @@ proper_check_create(_Config) ->
8989 cleanup (Sup_Pid , Fsm_Pid ),
9090 ok .
9191
92- check_create_test (Ring_Names , Sup_Pid , Fsm_Pid ) ->
92+ check_empty_create (Ring_Names , Sup_Pid , Fsm_Pid ) ->
9393 % % No rings exist yet...
9494 [] = ? TM :list (),
9595 [] = ? TM :list (missing_ring ),
9696
9797 ct :comment (" Testing ring_names ~p " , [Ring_Names ]),
9898 ct :log (" Testing ring_names ~p " , [Ring_Names ]),
99- Num_Rings = length (Ring_Names ),
100- Exp_Counts = lists :duplicate (Num_Rings , 0 ),
101- Exp_Counts = [check_one_ring (R ) || R <- Ring_Names ],
99+ [check_empty_ring (R ) || R <- Ring_Names ],
102100
103101 ct :comment (" Deleting all rings" ),
104102 Exp_Deletes = lists :duplicate (Num_Rings , true ),
@@ -107,7 +105,7 @@ check_create_test(Ring_Names, Sup_Pid, Fsm_Pid) ->
107105
108106 true .
109107
110- check_one_ring (Ring_Name ) ->
108+ check_empty_ring (Ring_Name ) ->
111109 true = ? TM :create (Ring_Name ),
112110 0 = ? TM :ring_size (Ring_Name ).
113111
0 commit comments