Skip to content

Commit

Permalink
test: stable brod_group_subscriber_SUITE:t_async_commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zmstone committed Jun 18, 2024
1 parent 28a3a2e commit d5e92b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion test/brod_group_subscriber_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ t_async_commit({init, Config}) ->
integer_to_list(rand:uniform(1000000000))),
[{group_id, GroupId} | Config];
t_async_commit(Config) when is_list(Config) ->
GroupId = ?config(group_id),
Behavior = ?config(behavior),
Topic = ?topic,
Partition = 0,
Expand All @@ -562,7 +563,7 @@ t_async_commit(Config) when is_list(Config) ->
, {partition_restart_delay_seconds, 1}
, {begin_offset, Offset}
],
{ok, SubscriberPid} = start_subscriber(?group_id, Config, [Topic],
{ok, SubscriberPid} = start_subscriber(GroupId, Config, [Topic],
GroupConfig, ConsumerConfig,
InitArgs),
SubscriberPid
Expand Down
8 changes: 4 additions & 4 deletions test/brod_topic_subscriber_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ t_consumer_ack_via_message_passing(Config) when is_list(Config) ->
Partition = 0,
SendFun =
fun(I) ->
produce({?topic, Partition}, <<I>>)
produce({?topic, Partition}, integer_to_binary(I))
end,
?check_trace(
%% Run stage:
Expand All @@ -225,12 +225,12 @@ t_consumer_ack_via_message_passing(Config) when is_list(Config) ->
{ok, SubscriberPid} =
brod:start_link_topic_subscriber(?CLIENT_ID, ?topic, ConsumerConfig,
?MODULE, InitArgs),
{ok, _} = wait_message(<<1>>),
{ok, _} = wait_message(<<"1">>),
%% ack_offset allows consumer to proceed to message 2
SubscriberPid ! {ack_offset, 0, Offset0},
{ok, _} = wait_message(<<2>>),
{ok, _} = wait_message(<<"2">>),
ok = brod_topic_subscriber:stop(SubscriberPid),
_Expected = [<<1>>, <<2>>]
_Expected = [<<"1">>, <<"2">>]
end,
%% Check stage:
fun(Expected, Trace) ->
Expand Down

0 comments on commit d5e92b4

Please sign in to comment.