Skip to content

Commit 8c1969e

Browse files
committed
simplified more
1 parent 89df11a commit 8c1969e

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/integration-tests/src/pubsub.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rand::{Rng, distr::Alphanumeric};
1717

1818
use crate::Result;
1919

20-
pub async fn basic_topic(builder: pubsub::builder::topic_admin::ClientBuilder) -> Result<()> {
20+
pub async fn basic_topic() -> Result<()> {
2121
// Enable a basic subscriber. Useful to troubleshoot problems and visually
2222
// verify tracing is doing something.
2323
#[cfg(feature = "log-integration-tests")]
@@ -33,8 +33,7 @@ pub async fn basic_topic(builder: pubsub::builder::topic_admin::ClientBuilder) -
3333
};
3434

3535
let project = crate::project_id()?;
36-
let client = builder.build().await?;
37-
let (topic_admin, topic) = create_test_topic().await?;
36+
let (client, topic) = create_test_topic().await?;
3837

3938
tracing::info!("testing list_topics()");
4039
let topics = client
@@ -45,7 +44,7 @@ pub async fn basic_topic(builder: pubsub::builder::topic_admin::ClientBuilder) -
4544
tracing::info!("success with list_topics={topics:?}");
4645
assert!(topics.topics.iter().any(|x| x.name == topic.name));
4746

48-
cleanup_test_topic(topic_admin, topic.name).await?;
47+
cleanup_test_topic(client, topic.name).await?;
4948

5049
Ok(())
5150
}

src/integration-tests/tests/driver.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ mod driver {
4949

5050
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
5151
async fn run_pubsub_basic_topic() -> integration_tests::Result<()> {
52-
integration_tests::pubsub::basic_topic(
53-
pubsub::client::TopicAdmin::builder().with_retry_policy(retry_policy()),
54-
)
55-
.await
56-
.map_err(integration_tests::report_error)
52+
integration_tests::pubsub::basic_topic()
53+
.await
54+
.map_err(integration_tests::report_error)
5755
}
5856

5957
#[test_case(sm::client::SecretManagerService::builder(); "default")]

0 commit comments

Comments
 (0)