diff --git a/appengine-java11/tasks/pom.xml b/appengine-java11/tasks/pom.xml
index e5a52b0a144..18b7ea1f6b3 100644
--- a/appengine-java11/tasks/pom.xml
+++ b/appengine-java11/tasks/pom.xml
@@ -45,7 +45,7 @@ Copyright 2019 Google LLC
com.google.cloud
google-cloud-tasks
- 1.26.0
+ 1.27.0
diff --git a/appengine-java8/tasks/app/pom.xml b/appengine-java8/tasks/app/pom.xml
index 7b113b92813..387e9905a0a 100644
--- a/appengine-java8/tasks/app/pom.xml
+++ b/appengine-java8/tasks/app/pom.xml
@@ -50,7 +50,7 @@ Copyright 2019 Google LLC
com.google.cloud
google-cloud-tasks
- 1.26.0
+ 1.27.0
diff --git a/appengine-java8/tasks/quickstart/pom.xml b/appengine-java8/tasks/quickstart/pom.xml
index d10462afa59..3060aefe8d1 100644
--- a/appengine-java8/tasks/quickstart/pom.xml
+++ b/appengine-java8/tasks/quickstart/pom.xml
@@ -52,7 +52,7 @@ Copyright 2018 Google LLC
com.google.cloud
google-cloud-tasks
- 1.26.0
+ 1.27.0
commons-cli
diff --git a/appengine-java8/tasks/snippets/pom.xml b/appengine-java8/tasks/snippets/pom.xml
index d5055de3451..b0e7a4eaeb1 100644
--- a/appengine-java8/tasks/snippets/pom.xml
+++ b/appengine-java8/tasks/snippets/pom.xml
@@ -44,7 +44,7 @@ Copyright 2019 Google LLC
com.google.cloud
google-cloud-tasks
- 1.26.0
+ 1.27.0
com.google.protobuf
diff --git a/tasks/pom.xml b/tasks/pom.xml
index 2f9629d7f6a..e16230aab78 100644
--- a/tasks/pom.xml
+++ b/tasks/pom.xml
@@ -44,7 +44,7 @@ Copyright 2018 Google LLC
com.google.cloud
google-cloud-tasks
- 1.26.0
+ 1.27.0
com.google.protobuf
diff --git a/tasks/src/main/java/com/example/task/CreateHttpTask.java b/tasks/src/main/java/com/example/task/CreateHttpTask.java
index 6e1e6b2ee4d..858b439ae58 100644
--- a/tasks/src/main/java/com/example/task/CreateHttpTask.java
+++ b/tasks/src/main/java/com/example/task/CreateHttpTask.java
@@ -17,11 +17,11 @@
package com.example.task;
// [START cloud_tasks_create_http_task]
-import com.google.cloud.tasks.v2beta3.CloudTasksClient;
-import com.google.cloud.tasks.v2beta3.HttpMethod;
-import com.google.cloud.tasks.v2beta3.HttpRequest;
-import com.google.cloud.tasks.v2beta3.QueueName;
-import com.google.cloud.tasks.v2beta3.Task;
+import com.google.cloud.tasks.v2.CloudTasksClient;
+import com.google.cloud.tasks.v2.HttpMethod;
+import com.google.cloud.tasks.v2.HttpRequest;
+import com.google.cloud.tasks.v2.QueueName;
+import com.google.cloud.tasks.v2.Task;
import com.google.protobuf.ByteString;
import java.nio.charset.Charset;
diff --git a/tasks/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/src/main/java/com/example/task/CreateHttpTaskWithToken.java
index 9259243bd97..72c4768ef35 100644
--- a/tasks/src/main/java/com/example/task/CreateHttpTaskWithToken.java
+++ b/tasks/src/main/java/com/example/task/CreateHttpTaskWithToken.java
@@ -17,12 +17,12 @@
package com.example.task;
// [START cloud_tasks_create_http_task_with_token]
-import com.google.cloud.tasks.v2beta3.CloudTasksClient;
-import com.google.cloud.tasks.v2beta3.HttpMethod;
-import com.google.cloud.tasks.v2beta3.HttpRequest;
-import com.google.cloud.tasks.v2beta3.OidcToken;
-import com.google.cloud.tasks.v2beta3.QueueName;
-import com.google.cloud.tasks.v2beta3.Task;
+import com.google.cloud.tasks.v2.CloudTasksClient;
+import com.google.cloud.tasks.v2.HttpMethod;
+import com.google.cloud.tasks.v2.HttpRequest;
+import com.google.cloud.tasks.v2.OidcToken;
+import com.google.cloud.tasks.v2.QueueName;
+import com.google.cloud.tasks.v2.Task;
import com.google.protobuf.ByteString;
import java.nio.charset.Charset;
diff --git a/tasks/src/test/java/com/example/task/CreateHttpTaskIT.java b/tasks/src/test/java/com/example/task/CreateHttpTaskIT.java
index 02bc66029b4..e03d907a677 100644
--- a/tasks/src/test/java/com/example/task/CreateHttpTaskIT.java
+++ b/tasks/src/test/java/com/example/task/CreateHttpTaskIT.java
@@ -18,13 +18,13 @@
import static com.google.common.truth.Truth.assertThat;
+import com.google.cloud.tasks.v2.CloudTasksClient;
+import com.google.cloud.tasks.v2.QueueName;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import org.junit.After;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -49,6 +49,12 @@ public void setUp() {
@After
public void tearDown() {
System.setOut(null);
+ try (CloudTasksClient client = CloudTasksClient.create()) {
+ String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString();
+ client.purgeQueue(queuePath);
+ } catch (Exception e) {
+ System.out.println("Error with queue purge.");
+ }
}
@Test