Repository navigation
Pubsub: Raise ValueError for message bytesize too big for batch - #4872
Conversation
| message = types.PubsubMessage(data=data, attributes=attrs) | ||
| if message.ByteSize() > self.batch_settings.max_bytes: | ||
| raise ValueError('Message being published is too large for the ' | ||
| 'batch settings with max bytes {}.'. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| assert isinstance(result, six.string_types) | ||
|
|
||
|
|
||
| def test_publish_max_bytes(publisher, topic_path, cleanup): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| client.publish(topic, 42) | ||
|
|
||
|
|
||
| def test_publish_data_too_large(): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@jonparrott PTAL, thanks. |
|
@chemelnucfin the CI failure here seems unrelated, so feel free to merge - but, could you send a follow-up PR to fix that? |
7da9574 to
b688939
Compare
|
@dpebot merge on green |
|
Okay! I'll merge when all statuses are green and all reviewers approve. |
No description provided.