Skip to content

Commit 75a8b9b

Browse files
authored
refactor(guide): use Storage for LRO guide (#3596)
Storage has fewer restrictions on the number of concurrent LROs. It has some restrictions on the number of concurrent bucket requests, but we know how to handle those.
1 parent 33934e9 commit 75a8b9b

File tree

9 files changed

+419
-574
lines changed

9 files changed

+419
-574
lines changed

guide/samples/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ pub mod compute;
2222
pub mod error_handling;
2323
pub mod examine_error_details;
2424
pub mod gemini;
25-
pub mod lro;
2625
pub mod pagination;
27-
pub mod polling_policies;
2826
pub mod retry_policies;
2927
pub mod update_resource;

guide/samples/src/lro.rs

Lines changed: 0 additions & 256 deletions
This file was deleted.

guide/samples/tests/driver.rs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ mod driver {
1818

1919
const SECRET_ID_LENGTH: usize = 32;
2020

21-
#[tokio::test(flavor = "multi_thread")]
22-
async fn lro_start() -> user_guide_samples::Result<()> {
23-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
24-
user_guide_samples::lro::start(&project_id).await
25-
}
26-
27-
#[tokio::test(flavor = "multi_thread")]
28-
async fn lro_automatic() -> user_guide_samples::Result<()> {
29-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
30-
user_guide_samples::lro::automatic(&project_id).await
31-
}
32-
3321
#[tokio::test(flavor = "multi_thread")]
3422
async fn gemini_text_prompt() -> user_guide_samples::Result<()> {
3523
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
@@ -42,12 +30,6 @@ mod driver {
4230
user_guide_samples::gemini::prompt_and_image(&project_id).await
4331
}
4432

45-
#[tokio::test(flavor = "multi_thread")]
46-
async fn lro_polling() -> user_guide_samples::Result<()> {
47-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
48-
user_guide_samples::lro::polling(&project_id).await
49-
}
50-
5133
#[tokio::test(flavor = "multi_thread")]
5234
async fn pagination_iterate_pages() -> user_guide_samples::Result<()> {
5335
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
@@ -78,30 +60,6 @@ mod driver {
7860
user_guide_samples::pagination::pagination_page_token(&project_id).await
7961
}
8062

81-
#[tokio::test(flavor = "multi_thread")]
82-
async fn polling_policies_client_backoff() -> user_guide_samples::Result<()> {
83-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
84-
user_guide_samples::polling_policies::client_backoff(&project_id).await
85-
}
86-
87-
#[tokio::test(flavor = "multi_thread")]
88-
async fn polling_policies_rpc_backoff() -> user_guide_samples::Result<()> {
89-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
90-
user_guide_samples::polling_policies::rpc_backoff(&project_id).await
91-
}
92-
93-
#[tokio::test(flavor = "multi_thread")]
94-
async fn polling_policies_client_errors() -> user_guide_samples::Result<()> {
95-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
96-
user_guide_samples::polling_policies::client_errors(&project_id).await
97-
}
98-
99-
#[tokio::test(flavor = "multi_thread")]
100-
async fn polling_policies_rpc_errors() -> user_guide_samples::Result<()> {
101-
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();
102-
user_guide_samples::polling_policies::rpc_errors(&project_id).await
103-
}
104-
10563
#[tokio::test(flavor = "multi_thread")]
10664
async fn retry_policies_client() -> user_guide_samples::Result<()> {
10765
let project_id = std::env::var("GOOGLE_CLOUD_PROJECT").unwrap();

0 commit comments

Comments
 (0)