Skip to content

Commit 5c1b5d8

Browse files
committed
fixes
1 parent 635412b commit 5c1b5d8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

deps/rabbitmq_stream/src/Elixir.RabbitMQ.CLI.Ctl.Commands.AddSuperStreamCommand.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ run([SuperStream],
193193
routing_keys := RoutingKeysStr} =
194194
Opts) ->
195195
Spec0 = maps:with([vhost, exchange_type], Opts),
196-
RoutingKeys = [K || K <- string:lexemes(RoutingKeysStr, ", ")],
196+
RoutingKeys = [string:trim(K) || K <- string:lexemes(RoutingKeysStr, ",")],
197197
Spec =
198198
Spec0#{username => cli_acting_user(),
199199
name => SuperStream,

deps/rabbitmq_stream/test/rabbit_stream_utils_SUITE.erl

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ end_per_testcase(_TestCase, _Config) ->
4545
%%%===================================================================
4646

4747
sort_partitions(_Config) ->
48-
[] = rabbit_stream_utils:sort_partitions([]),
48+
Exchange = #exchange{type = direct},
49+
[] = rabbit_stream_utils:sort_partitions(Exchange, []),
4950
?assertEqual([<<"a">>, <<"b">>, <<"c">>],
5051
[S
5152
|| #binding{destination = #resource{name = S}}
52-
<- rabbit_stream_utils:sort_partitions([binding(<<"c">>,
53+
<- rabbit_stream_utils:sort_partitions(Exchange,
54+
[binding(<<"c">>,
5355
2),
5456
binding(<<"b">>,
5557
1),
@@ -58,7 +60,8 @@ sort_partitions(_Config) ->
5860
?assertEqual([<<"a">>, <<"c">>, <<"no-order-field">>],
5961
[S
6062
|| #binding{destination = #resource{name = S}}
61-
<- rabbit_stream_utils:sort_partitions([binding(<<"c">>,
63+
<- rabbit_stream_utils:sort_partitions(Exchange,
64+
[binding(<<"c">>,
6265
10),
6366
binding(<<"no-order-field">>),
6467
binding(<<"a">>,

0 commit comments

Comments
 (0)