aboutsummaryrefslogtreecommitdiff
path: root/internal/queue/queue_test.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2020-09-29 06:14:34 -0400
committerJonathan Amsterdam <jba@google.com>2020-09-29 15:35:17 +0000
commite91ba8014eec837f43b0ba7ffaf857a9b62b1a82 (patch)
tree479bc2d3e1b26d1863770d0d469b390e3717362d /internal/queue/queue_test.go
parent8962bff2e39e2bc62ea9222416113b8067358674 (diff)
downloadgo-x-pkgsite-e91ba8014eec837f43b0ba7ffaf857a9b62b1a82.tar.xz
internal/queue: increase task timeout
HTTP tasks (but not AppEngine tasks) have a default timeout of 10 minutes. Extend that to the maximum of 30 minutes. Change-Id: I75efc0523ff83471a0a2a8d453e1284483feefe1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258197 Reviewed-by: Julie Qiu <julie@golang.org> Trust: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/queue/queue_test.go')
-rw-r--r--internal/queue/queue_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/queue/queue_test.go b/internal/queue/queue_test.go
index 55348989..e713ae85 100644
--- a/internal/queue/queue_test.go
+++ b/internal/queue/queue_test.go
@@ -8,6 +8,7 @@ import (
"testing"
"time"
+ "github.com/golang/protobuf/ptypes"
"github.com/google/go-cmp/cmp"
"golang.org/x/pkgsite/internal/config"
taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2"
@@ -50,6 +51,7 @@ func TestNewTaskRequest(t *testing.T) {
&taskspb.CreateTaskRequest{
Parent: "projects/Project/locations/us-central1/queues/queueID",
Task: &taskspb.Task{
+ DispatchDeadline: ptypes.DurationProto(maxCloudTasksTimeout),
MessageType: &taskspb.Task_AppEngineHttpRequest{
AppEngineHttpRequest: &taskspb.AppEngineHttpRequest{
HttpMethod: taskspb.HttpMethod_POST,
@@ -74,6 +76,7 @@ func TestNewTaskRequest(t *testing.T) {
&taskspb.CreateTaskRequest{
Parent: "projects/Project/locations/us-central1/queues/queueID",
Task: &taskspb.Task{
+ DispatchDeadline: ptypes.DurationProto(maxCloudTasksTimeout),
MessageType: &taskspb.Task_HttpRequest{
HttpRequest: &taskspb.HttpRequest{
HttpMethod: taskspb.HttpMethod_POST,