From ebf13c90eac4d024c4918f6ac225f4e115370983 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Fri, 1 Sep 2023 19:48:56 +0400 Subject: [PATCH] test(router): make sort stable in e2e routing testcase --- apps/emqx/test/emqx_routing_SUITE.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/emqx/test/emqx_routing_SUITE.erl b/apps/emqx/test/emqx_routing_SUITE.erl index 945e84248..dbc4dc193 100644 --- a/apps/emqx/test/emqx_routing_SUITE.erl +++ b/apps/emqx/test/emqx_routing_SUITE.erl @@ -131,7 +131,12 @@ t_cluster_routing(Config) -> {pub, C3, #{topic := <<"a/b/d">>, payload := <<"07">>}}, {pub, C3, #{topic := <<"a/b/d">>, payload := <<"10">>}} ], - lists:sort(Deliveries) + lists:sort( + fun({pub, CL, #{payload := PL}}, {pub, CR, #{payload := PR}}) -> + {CL, PL} < {CR, PR} + end, + Deliveries + ) ). start_client(Node) ->