From ebee2a94ffa6f16bc14ffa6dbc20d3c2f7b5bb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mar=C3=ADn?= Date: Thu, 7 Sep 2023 11:40:31 +0100 Subject: [PATCH] docs: fix test_message and test_batch options (#329) --- lib/broadway.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/broadway.ex b/lib/broadway.ex index badc7c8..ef65a74 100644 --- a/lib/broadway.ex +++ b/lib/broadway.ex @@ -1145,7 +1145,7 @@ defmodule Broadway do |> Topology.ProducerStage.push_messages(messages) end - test_messages_options_schema = [ + test_batch_options_schema = [ metadata: [ type: :any, default: [], @@ -1174,11 +1174,11 @@ defmodule Broadway do ] ] - @test_message_options_schema NimbleOptions.new!(test_messages_options_schema) + @test_batch_options_schema NimbleOptions.new!(test_batch_options_schema) - @test_batch_options_schema test_messages_options_schema - |> Keyword.delete(:batch_mode) - |> NimbleOptions.new!() + @test_message_options_schema test_batch_options_schema + |> Keyword.delete(:batch_mode) + |> NimbleOptions.new!() @doc """ Sends a test message through the Broadway pipeline. @@ -1262,7 +1262,7 @@ defmodule Broadway do @spec test_batch(broadway :: name(), data :: [term], opts :: Keyword.t()) :: reference def test_batch(broadway, batch_data, opts \\ []) when is_broadway_name(broadway) and is_list(batch_data) and is_list(opts) do - opts = NimbleOptions.validate!(opts, @test_message_options_schema) + opts = NimbleOptions.validate!(opts, @test_batch_options_schema) {batch_mode, opts} = Keyword.pop(opts, :batch_mode, :bulk) test_messages(broadway, batch_data, batch_mode, opts) end