Skip to content

Commit

Permalink
increase polling interval (#1502)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaysngupta authored Feb 2, 2023
1 parent 78cb402 commit 94b2b22
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ vet-e2e:
test-all: unittest

unittest:
@go get github.com/jstemmer/go-junit-report
@go get github.com/axw/gocov/gocov
@go get github.com/AlekSi/gocov-xml
@go get github.com/matm/gocov-html
@go install github.com/jstemmer/go-junit-report@latest
@go install github.com/axw/gocov/gocov@latest
@go install github.com/AlekSi/gocov-xml@latest
@go install github.com/matm/gocov-html/cmd/gocov-html@latest
@go mod tidy
@go test -timeout 80s -v -coverprofile=coverage.txt -covermode count -tags unittest ./... > testoutput.txt || { echo "go test returned non-zero"; cat testoutput.txt; exit 1; }
@cat testoutput.txt | go-junit-report > report.xml
@gocov convert coverage.txt > coverage.json
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/onsi/gomega v1.19.0
github.com/prometheus/client_golang v1.11.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.1 // indirect
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.21.2
k8s.io/apimachinery v0.21.2
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
Expand Down
5 changes: 5 additions & 0 deletions pkg/azure/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"context"
"encoding/json"
"fmt"
"time"

r "github.com/Azure/azure-sdk-for-go/profiles/latest/resources/mgmt/resources"
n "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-03-01/network"
Expand Down Expand Up @@ -101,6 +102,10 @@ func NewAzClient(subscriptionID SubscriptionID, resourceGroupName ResourceGroup,
klog.Error("Error adding User Agent to Deployments client: ", userAgent)
}

// increase the polling duration to 60 minutes
az.appGatewaysClient.PollingDuration = 60 * time.Minute
az.deploymentsClient.PollingDuration = 60 * time.Minute

return az
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/k8scontext/secretstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var _ = ginkgo.Describe("Testing K8sContext.SecretStore", func() {
err := secretsStore.ConvertSecret("someKey", tests.NewSecretTestFixture())
Expect(err).ToNot(HaveOccurred())
actual := secretsStore.GetPfxCertificate("someKey")
Expect(len(actual)).To(Equal(2477))
Expect(len(actual)).To(BeNumerically(">", 0))
})
})
})

0 comments on commit 94b2b22

Please sign in to comment.