Closed moniquelive closed 2 years ago
The Broadway.test_batch example on this section doesn't work with Broadway 1.0.3 because the first parameter is a pid.
Broadway.test_batch
And test_batch uses the following guard to verify its first parameter:
test_batch
defguardp is_broadway_name(name) when is_atom(name) or (is_tuple(name) and tuple_size(name) == 3)
No pids. This one would work:
test "batch messages" do ref = Broadway.test_batch(MyBroadway, [1, 2, 3]) assert_receive {:ack, ^ref, [%{data: 1}, %{data: 2}, %{data: 3}], []}, 1000 end
I can send a PR if you agree.
Yes, please update the docs to use the Broadway name. :) PR is welcome!
My bad! It's fixed already. Somehow I landed on 1.0.0 docs. Sorry for the noise.
1.0.0
Np, thanks for checking!
The
Broadway.test_batch
example on this section doesn't work with Broadway 1.0.3 because the first parameter is a pid.And
test_batch
uses the following guard to verify its first parameter:No pids. This one would work:
I can send a PR if you agree.