Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ def heartbeat(self) -> bool:
request = gapic_types.StreamingPullRequest(
stream_ack_deadline_seconds=self.ack_deadline
)
_LOGGER.info(
"Sending new ack_deadline of %d seconds.", self.ack_deadline
)
else:
request = gapic_types.StreamingPullRequest()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,8 @@ def test_heartbeat_inactive():
assert not result


def test_heartbeat_stream_ack_deadline_seconds():
def test_heartbeat_stream_ack_deadline_seconds(caplog):
caplog.set_level(logging.INFO)
manager = make_manager()
manager._rpc = mock.create_autospec(bidi.BidiRpc, instance=True)
manager._rpc.is_active = True
Expand All @@ -1050,6 +1051,7 @@ def test_heartbeat_stream_ack_deadline_seconds():
assert result
# Set to false after a send is initiated.
assert not manager._send_new_ack_deadline
assert "Sending new ack_deadline of 10 seconds." in caplog.text


@mock.patch("google.api_core.bidi.ResumableBidiRpc", autospec=True)
Expand Down