Skip to content

Commit

Permalink
chore: remove flaky test and adjust doc
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveigah committed Nov 16, 2024
1 parent fedfd4a commit da38c97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
2 changes: 1 addition & 1 deletion lib/klife/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ defmodule Klife.Client do
> #### Semantics and guarantees {: .info}
>
> This functions is implemented as `Task.start/1` calling [`produce/2`](c:produce/2).
> This functions executes the callback using `Task.start/1`.
> Therefore there is no guarantees about record delivery or callback execution.
## Options
Expand Down
34 changes: 0 additions & 34 deletions test/producer/producer_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -611,40 +611,6 @@ defmodule Klife.ProducerTest do
assert :ok = TestUtils.assert_offset(MyClient, rec3, new_rec3.offset)
end

test "produce message batch async - no callback" do
key1 = :rand.bytes(10)

rec1 = %Record{
value: :rand.bytes(10),
key: key1,
headers: [%{key: :rand.bytes(10), value: :rand.bytes(10)}],
topic: "test_async_topic",
partition: 1
}

key2 = :rand.bytes(10)

rec2 = %Record{
value: :rand.bytes(10),
key: key2,
headers: [%{key: :rand.bytes(10), value: :rand.bytes(10)}],
topic: "test_no_batch_topic",
partition: 1
}

key3 = :rand.bytes(10)

rec3 = %Record{
value: :rand.bytes(10),
key: key3,
headers: [%{key: :rand.bytes(10), value: :rand.bytes(10)}],
topic: "test_async_topic",
partition: 3
}

assert :ok = MyClient.produce_batch_async([rec1, rec2, rec3])
end

test "produce message async no batching - anon fun" do
rec = %Record{
value: :rand.bytes(10),
Expand Down

0 comments on commit da38c97

Please sign in to comment.