From cb1e312b7fd18e1555e9bd0ce54bbbbada60d734 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Sun, 5 Sep 2021 14:04:26 -0400 Subject: [PATCH] chore: migrate to owlbot (#516) --- .../main/java/com/example/task/CreateHttpTaskWithToken.java | 2 +- tasks/snippets/src/main/java/com/example/task/ListQueues.java | 3 +-- .../snippets/src/test/java/com/example/task/DeleteQueueIT.java | 2 +- .../snippets/src/test/java/com/example/task/ListQueuesIT.java | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index a341f680fea..91cd8c2275d 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -34,7 +34,7 @@ public static void main(String[] args) throws IOException { String projectId = "my-project-id"; String locationId = "us-central1"; String queueId = "my-queue"; - String serviceAccountEmail = + String serviceAccountEmail = "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"; createTask(projectId, locationId, queueId, serviceAccountEmail); } diff --git a/tasks/snippets/src/main/java/com/example/task/ListQueues.java b/tasks/snippets/src/main/java/com/example/task/ListQueues.java index 85fd8c14cc6..2405eecacae 100644 --- a/tasks/snippets/src/main/java/com/example/task/ListQueues.java +++ b/tasks/snippets/src/main/java/com/example/task/ListQueues.java @@ -30,8 +30,7 @@ public static void main(String[] args) throws IOException { } // List queues using the Cloud Tasks client. - public static void listQueues(String projectId, String locationId) - throws IOException { + public static void listQueues(String projectId, String locationId) throws IOException { // Instantiates a client. try (CloudTasksClient client = CloudTasksClient.create()) { diff --git a/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java b/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java index 90c3f74bf59..3bf3ad63a56 100644 --- a/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java +++ b/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java @@ -61,7 +61,7 @@ public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); - + try (CloudTasksClient client = CloudTasksClient.create()) { String parent = LocationName.of(PROJECT_ID, LOCATION_ID).toString(); String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); diff --git a/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java b/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java index 11e68b8e58e..287a83ecb84 100644 --- a/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java +++ b/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java @@ -17,7 +17,6 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNotNull; -import com.google.api.gax.rpc.NotFoundException; import com.google.cloud.tasks.v2.CloudTasksClient; import com.google.cloud.tasks.v2.LocationName; import com.google.cloud.tasks.v2.Queue; @@ -61,7 +60,7 @@ public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); - + try (CloudTasksClient client = CloudTasksClient.create()) { String parent = LocationName.of(PROJECT_ID, LOCATION_ID).toString(); String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString();