From da38c97a77601beaff8b408139e37ee0c35ff88d Mon Sep 17 00:00:00 2001 From: Gabriel Oliveira Date: Fri, 15 Nov 2024 23:20:54 -0300 Subject: [PATCH] chore: remove flaky test and adjust doc --- lib/klife/client.ex | 2 +- test/producer/producer_test.exs | 34 --------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/lib/klife/client.ex b/lib/klife/client.ex index 7a7968a..e6d9bd2 100644 --- a/lib/klife/client.ex +++ b/lib/klife/client.ex @@ -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 diff --git a/test/producer/producer_test.exs b/test/producer/producer_test.exs index 237ce12..acea9a7 100644 --- a/test/producer/producer_test.exs +++ b/test/producer/producer_test.exs @@ -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),