Skip to content

test(pubsub): add subscriber sample using into_stream()#4592

Open
haphungw wants to merge 4 commits intogoogleapis:mainfrom
haphungw:session-sample-update
Open

test(pubsub): add subscriber sample using into_stream()#4592
haphungw wants to merge 4 commits intogoogleapis:mainfrom
haphungw:session-sample-update

Conversation

@haphungw
Copy link
Contributor

@haphungw haphungw commented Feb 6, 2026

For #4574

@product-auto-label product-auto-label bot added api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples. labels Feb 6, 2026
@haphungw haphungw force-pushed the session-sample-update branch from bd2ed97 to 179e079 Compare February 6, 2026 19:40
@haphungw haphungw force-pushed the session-sample-update branch 2 times, most recently from 95548e1 to fd1348a Compare February 6, 2026 19:59
@haphungw haphungw changed the title test(pubsub): update quickstart_subscriber sample to use into_stream() test(pubsub): add subscriber sample using into_stream() Feb 6, 2026
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (4662c64) to head (8d6298e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4592      +/-   ##
==========================================
+ Coverage   95.01%   95.02%   +0.01%     
==========================================
  Files         195      195              
  Lines        7458     7464       +6     
==========================================
+ Hits         7086     7093       +7     
+ Misses        372      371       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haphungw haphungw marked this pull request as ready for review February 6, 2026 20:15
@haphungw haphungw requested a review from a team as a code owner February 6, 2026 20:15
@haphungw haphungw force-pushed the session-sample-update branch from fd1348a to 8d6298e Compare February 6, 2026 22:07
Copy link
Collaborator

@coryan coryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is blocking some other work, merge and we can iterate. Otherwise it may need to work until Monday, I am about to stop working.

for name in subscriptions.into_iter() {
if let Err(e) = cleanup_test_subscription(&subscription_admin, name.clone()).await {
println!("Error cleaning up test subscription {name}: {e:?}");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the ? inside this block will return from the function, skipping the cleanup.

I think we need to move these to a function. Which (incidentally) can be outside the #[cfg(all(test, feature = "run-integration-tests"))] conditional and get better linting and faster feedback loops during development.

@dbolduc dbolduc added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 6, 2026
@dbolduc
Copy link
Member

dbolduc commented Feb 6, 2026

merge

We should get #4590 in first, then rebase this PR on top of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. do not merge Indicates a pull request not ready for merge, due to either quality or timing. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants