File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
google/cloud/pubsub_v1/subscriber/_protocol
tests/unit/pubsub_v1/subscriber Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -927,20 +927,11 @@ def _get_initial_request(
927
927
A request suitable for being the first request on the stream (and not
928
928
suitable for any other purpose).
929
929
"""
930
- # Any ack IDs that are under lease management need to have their
931
- # deadline extended immediately.
932
- if self ._leaser is not None :
933
- # Explicitly copy the list, as it could be modified by another
934
- # thread.
935
- lease_ids = list (self ._leaser .ack_ids )
936
- else :
937
- lease_ids = []
938
-
939
930
# Put the request together.
940
931
request = gapic_types .StreamingPullRequest (
941
- modify_deadline_ack_ids = list (lease_ids ),
942
- modify_deadline_seconds = [self .ack_deadline ] * len (lease_ids ),
943
932
stream_ack_deadline_seconds = stream_ack_deadline_seconds ,
933
+ modify_deadline_ack_ids = [],
934
+ modify_deadline_seconds = [],
944
935
subscription = self ._subscription ,
945
936
client_id = self ._client_id ,
946
937
max_outstanding_messages = (
Original file line number Diff line number Diff line change @@ -1318,8 +1318,8 @@ def test__get_initial_request():
1318
1318
assert isinstance (initial_request , gapic_types .StreamingPullRequest )
1319
1319
assert initial_request .subscription == "subscription-name"
1320
1320
assert initial_request .stream_ack_deadline_seconds == 123
1321
- assert initial_request .modify_deadline_ack_ids == ["1" , "2" ]
1322
- assert initial_request .modify_deadline_seconds == [10 , 10 ]
1321
+ assert initial_request .modify_deadline_ack_ids == []
1322
+ assert initial_request .modify_deadline_seconds == []
1323
1323
1324
1324
1325
1325
def test__get_initial_request_wo_leaser ():
You can’t perform that action at this time.
0 commit comments