Skip to content

Commit fe95111

Browse files
michaelklishinmergify[bot]
authored andcommitted
Update is_quorum_critical_test for #12133
Now the API endpoint can return Khepri as a "queue" (or "stream") without the necessary number of replicas online. So don't expect the list to only have one element. (cherry picked from commit d7d1397) (cherry picked from commit 0644930)
1 parent 4a57eb7 commit fe95111

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deps/rabbitmq_management/test/rabbit_mgmt_http_health_checks_SUITE.erl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,11 @@ is_quorum_critical_test(Config) ->
223223
Body = http_get_failed(Config, "/health/checks/node-is-quorum-critical"),
224224
?assertEqual(<<"failed">>, maps:get(<<"status">>, Body)),
225225
?assertEqual(true, maps:is_key(<<"reason">>, Body)),
226-
[Queue] = maps:get(<<"queues">>, Body),
227-
?assertEqual(QName, maps:get(<<"name">>, Queue)),
226+
Queues = maps:get(<<"queues">>, Body),
227+
?assert(lists:any(
228+
fun(Item) ->
229+
QName =:= maps:get(<<"name">>, Item)
230+
end, Queues)),
228231

229232
passed.
230233

0 commit comments

Comments
 (0)