15
15
16
16
all () ->
17
17
[
18
- {group , quorum_queue },
19
- {group , stream }
18
+ {group , clustered }
20
19
].
21
20
22
21
groups () ->
23
22
[
24
- {quorum_queue , [], [
25
- await_quorum_plus_one_qq
26
- ]},
27
- {stream , [], [
28
- await_quorum_plus_one_stream
29
- ]},
30
- {stream_coordinator , [], [
31
- await_quorum_plus_one_stream_coordinator
23
+ {clustered , [], [
24
+ await_quorum_plus_one_qq ,
25
+ await_quorum_plus_one_stream ,
26
+ await_quorum_plus_one_stream_coordinator ,
27
+ await_quorum_plus_one_rabbitmq_metadata
32
28
]}
33
29
].
34
30
@@ -45,31 +41,30 @@ end_per_suite(Config) ->
45
41
rabbit_ct_helpers :run_teardown_steps (Config ).
46
42
47
43
init_per_group (Group , Config ) ->
48
- case rabbit_ct_helpers :is_mixed_versions () of
49
- true ->
50
- % % in a 3.8/3.9 mixed cluster, ra will not cluster across versions,
51
- % % so quorum plus one will not be achieved
52
- {skip , " not mixed versions compatible" };
53
- _ ->
54
- Config1 = rabbit_ct_helpers :set_config (Config ,
55
- [
56
- {rmq_nodes_count , 3 },
57
- {rmq_nodename_suffix , Group }
58
- ]),
59
- rabbit_ct_helpers :run_steps (Config1 ,
60
- rabbit_ct_broker_helpers :setup_steps () ++
61
- rabbit_ct_client_helpers :setup_steps ())
62
- end .
44
+ Config1 = rabbit_ct_helpers :set_config (Config ,
45
+ [
46
+ {rmq_nodes_count , 3 },
47
+ {rmq_nodename_suffix , Group }
48
+ ]),
49
+ rabbit_ct_helpers :run_steps (Config1 ,
50
+ rabbit_ct_broker_helpers :setup_steps () ++
51
+ rabbit_ct_client_helpers :setup_steps ()).
63
52
64
53
end_per_group (_Group , Config ) ->
65
54
rabbit_ct_helpers :run_steps (Config ,
66
55
rabbit_ct_client_helpers :teardown_steps () ++
67
56
rabbit_ct_broker_helpers :teardown_steps ()).
68
57
69
58
70
- init_per_testcase (TestCase , Config ) ->
71
- rabbit_ct_helpers :testcase_started (Config , TestCase ),
72
- Config .
59
+ init_per_testcase (Testcase , Config ) when Testcase == await_quorum_plus_one_rabbitmq_metadata ->
60
+ case rabbit_ct_helpers :is_mixed_versions () of
61
+ true ->
62
+ {skip , " not mixed versions compatible" };
63
+ _ ->
64
+ rabbit_ct_helpers :testcase_started (Config , Testcase )
65
+ end ;
66
+ init_per_testcase (Testcase , Config ) ->
67
+ rabbit_ct_helpers :testcase_started (Config , Testcase ).
73
68
74
69
end_per_testcase (TestCase , Config ) ->
75
70
rabbit_ct_helpers :testcase_finished (Config , TestCase ).
@@ -121,12 +116,24 @@ await_quorum_plus_one_stream_coordinator(Config) ->
121
116
% % no queues/streams beyond this point
122
117
123
118
ok = rabbit_ct_broker_helpers :stop_node (Config , B ),
124
- % % this should fail because the corrdinator has only 2 running nodes
119
+ % % this should fail because the coordinator has only 2 running nodes
125
120
? assertNot (await_quorum_plus_one (Config , 0 )),
126
121
127
122
ok = rabbit_ct_broker_helpers :start_node (Config , B ),
128
123
? assert (await_quorum_plus_one (Config , 0 )).
129
124
125
+ await_quorum_plus_one_rabbitmq_metadata (Config ) ->
126
+ Nodes = [A , B , _C ] = rabbit_ct_broker_helpers :get_node_configs (Config , nodename ),
127
+ ok = rabbit_ct_broker_helpers :enable_feature_flag (Config , Nodes , khepri_db ),
128
+ ? assert (await_quorum_plus_one (Config , A )),
129
+
130
+ ok = rabbit_ct_broker_helpers :stop_node (Config , B ),
131
+ % % this should fail because rabbitmq_metadata has only 2 running nodes
132
+ ? assertNot (await_quorum_plus_one (Config , A )),
133
+
134
+ ok = rabbit_ct_broker_helpers :start_node (Config , B ),
135
+ ? assert (await_quorum_plus_one (Config , A )).
136
+
130
137
% %
131
138
% % Implementation
132
139
% %
0 commit comments