Skip to content
Open
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
3 changes: 3 additions & 0 deletions src/pubsub/src/subscriber/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,9 @@ mod tests {

#[tokio::test(start_paused = true)]
async fn retry_transient_when_starting_stream() -> anyhow::Result<()> {
// The policy should retry forever. Our default retry policies have an
// attempt limit of 10. So we arbitrarily pick a number greater than 10
// for this test.
const NUM_RETRIES: u32 = 20;

let start_time = tokio::time::Instant::now();
Expand Down
6 changes: 4 additions & 2 deletions src/pubsub/src/subscriber/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ mod tests {
let mut mock_stub = MockStub::new();
let mut mock_backoff = MockBackoffPolicy::new();
for attempt in 1..20 {
// Simulate N transient errors + N backoffs.
// Simulate N transient errors + N backoffs. We arbitrarily pick an
// N > 10 (the default attempt limit for GAPICs).
mock_stub
.expect_streaming_pull()
.times(1)
Expand Down Expand Up @@ -338,7 +339,8 @@ mod tests {
let mut mock_stub = MockStub::new();
let mut mock_backoff = MockBackoffPolicy::new();
for attempt in 1..20 {
// Simulate N transient errors + N backoffs.
// Simulate N transient errors + N backoffs. We arbitrarily pick an
// N > 10 (the default attempt limit for GAPICs).
mock_stub
.expect_streaming_pull()
.times(1)
Expand Down
Loading