2121import com .google .cloud .ServiceOptions ;
2222import com .google .cloud .pubsub .v1 .SubscriptionAdminClient ;
2323import com .google .cloud .pubsub .v1 .TopicAdminClient ;
24- import com .google .pubsub .v1 .SubscriptionName ;
25- import com .google .pubsub .v1 .TopicName ;
24+ import com .google .pubsub .v1 .ProjectSubscriptionName ;
25+ import com .google .pubsub .v1 .ProjectTopicName ;
2626import java .io .ByteArrayOutputStream ;
2727import java .io .IOException ;
2828import java .io .PrintStream ;
@@ -133,7 +133,7 @@ private String formatForTest(String name) {
133133
134134 private void deleteTestTopic () throws Exception {
135135 try (TopicAdminClient topicAdminClient = TopicAdminClient .create ()) {
136- topicAdminClient .deleteTopic (TopicName .of (projectId , topicId ));
136+ topicAdminClient .deleteTopic (ProjectTopicName .of (projectId , topicId ));
137137 } catch (IOException e ) {
138138 System .err .println ("Error deleting topic " + e .getMessage ());
139139 }
@@ -142,7 +142,7 @@ private void deleteTestTopic() throws Exception {
142142 private void deleteTestSubscription () throws Exception {
143143 try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient .create ()) {
144144 subscriptionAdminClient .deleteSubscription (
145- SubscriptionName .of (projectId , subscriptionId ));
145+ ProjectSubscriptionName .of (projectId , subscriptionId ));
146146 } catch (IOException e ) {
147147 System .err .println ("Error deleting subscription " + e .getMessage ());
148148 }
0 commit comments