Use a function call when a pipeline is only one function long
MODIFY
test/integration/consumer_group_test.exs
test/integration/consumer_group_test.exs
@@ -211,7 +211,7 @@ defmodule KafkaEx.ConsumerGroup.Test do
})
stream = KafkaEx.stream(random_string, 0, worker_name: :stream_auto_commit, offset: 0)
log = TestHelper.wait_for_any(
- fn() -> stream |> Enum.take(2) end
+ fn() -> Enum.take(stream, 2) end
)
refute Enum.empty?(log)
@@ -240,7 +240,7 @@ defmodule KafkaEx.ConsumerGroup.Test do
stream = KafkaEx.stream(random_string, 0, worker_name: worker_name)
log = TestHelper.wait_for_any(
- fn() -> stream |> Enum.take(2) end
+ fn() -> Enum.take(stream, 2) end
)
refute Enum.empty?(log)
@@ -256,7 +256,7 @@ defmodule KafkaEx.ConsumerGroup.Test do
# make sure we consume at least one message before we assert that there is no offset committed
_log = TestHelper.wait_for_any(
- fn() -> stream |> Enum.take(2) end
+ fn() -> Enum.take(stream, 2) end
)
offset_fetch_response = KafkaEx.offset_fetch(:stream_no_auto_commit, %Proto.OffsetFetch.Request{topic: random_string, partition: 0}) |> hd

Use a function call when a pipeline is only one function long