@@ -382,10 +382,6 @@ class CallbackError(Exception):
382382 with pytest .raises (CallbackError ):
383383 future .result (timeout = 30 )
384384
385- @pytest .mark .xfail (
386- reason = "The default stream ACK deadline is static and received messages "
387- "exceeding FlowControl.max_messages are currently not lease managed."
388- )
389385 def test_streaming_pull_ack_deadline (
390386 self , publisher , subscriber , project , topic_path , subscription_path , cleanup
391387 ):
@@ -400,29 +396,29 @@ def test_streaming_pull_ack_deadline(
400396 # Subscribe to the topic. This must happen before the messages
401397 # are published.
402398 subscriber .create_subscription (
403- subscription_path , topic_path , ack_deadline_seconds = 240
399+ subscription_path , topic_path , ack_deadline_seconds = 45
404400 )
405401
406402 # publish some messages and wait for completion
407403 self ._publish_messages (publisher , topic_path , batch_sizes = [2 ])
408404
409405 # subscribe to the topic
410406 callback = StreamingPullCallback (
411- processing_time = 70 , # more than the default stream ACK deadline (60s )
407+ processing_time = 13 , # more than the default stream ACK deadline (10s )
412408 resolve_at_msg_count = 3 , # one more than the published messages count
413409 )
414410 flow_control = types .FlowControl (max_messages = 1 )
415411 subscription_future = subscriber .subscribe (
416412 subscription_path , callback , flow_control = flow_control
417413 )
418414
419- # We expect to process the first two messages in 2 * 70 seconds, and
415+ # We expect to process the first two messages in 2 * 13 seconds, and
420416 # any duplicate message that is re-sent by the backend in additional
421- # 70 seconds, totalling 210 seconds (+ overhead) --> if there have been
422- # no duplicates in 240 seconds, we can reasonably assume that there
417+ # 13 seconds, totalling 39 seconds (+ overhead) --> if there have been
418+ # no duplicates in 60 seconds, we can reasonably assume that there
423419 # won't be any.
424420 try :
425- callback .done_future .result (timeout = 240 )
421+ callback .done_future .result (timeout = 60 )
426422 except exceptions .TimeoutError :
427423 # future timed out, because we received no excessive messages
428424 assert sorted (callback .seen_message_ids ) == [1 , 2 ]
0 commit comments