Skip to content

Commit

Permalink
Default chunk size for pubsub is 100
Browse files Browse the repository at this point in the history
  • Loading branch information
Imanol Cea committed Aug 21, 2020
1 parent 883dcdf commit 467db90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/postoffice/messaging/publisher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defmodule Postoffice.Messaging.Publisher do
def calculate_chunk_size(publisher) do
case publisher.chunk_size do
nil ->
1
100

value ->
value
Expand Down
4 changes: 2 additions & 2 deletions test/postoffice/messaging/publisher_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ defmodule Postoffice.Messaging.PublisherTest do
assert Publisher.calculate_chunk_size(publisher) == 1
end

test "calculate_chunk_size/1 returns 1 when publisher's type is pubsub and no chunk specified" do
test "calculate_chunk_size/1 returns 100 when publisher's type is pubsub and no chunk specified" do
topic = Fixtures.create_topic()
publisher = Fixtures.create_publisher(topic, @pubsub_publisher_attrs)

assert Publisher.calculate_chunk_size(publisher) == 1
assert Publisher.calculate_chunk_size(publisher) == 100
end

test "calculate_chunk_size/1 returns publishers chunk_size when publisher's type is pubsub" do
Expand Down

0 comments on commit 467db90

Please sign in to comment.