Skip to content

Commit 5a48602

Browse files
committed
Replace Get operations with polling and skip flakes during integration test
1 parent 82a4f6c commit 5a48602

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/gce-cloud-provider/compute/gce-compute.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ func (cloud *CloudProvider) getRegionalDiskTypeURI(project string, region, diskT
10661066
func (cloud *CloudProvider) waitForZonalOp(ctx context.Context, project, opName string, zone string) error {
10671067
// The v1 API can query for v1, alpha, or beta operations.
10681068
return wait.ExponentialBackoff(WaitForOpBackoff, func() (bool, error) {
1069-
pollOp, err := cloud.service.ZoneOperations.Get(project, zone, opName).Context(ctx).Do()
1069+
pollOp, err := cloud.service.ZoneOperations.Wait(project, zone, opName).Context(ctx).Do()
10701070
if err != nil {
10711071
klog.Errorf("WaitForOp(op: %s, zone: %#v) failed to poll the operation", opName, zone)
10721072
return false, err
@@ -1079,7 +1079,7 @@ func (cloud *CloudProvider) waitForZonalOp(ctx context.Context, project, opName
10791079
func (cloud *CloudProvider) waitForRegionalOp(ctx context.Context, project, opName string, region string) error {
10801080
// The v1 API can query for v1, alpha, or beta operations.
10811081
return wait.ExponentialBackoff(WaitForOpBackoff, func() (bool, error) {
1082-
pollOp, err := cloud.service.RegionOperations.Get(project, region, opName).Context(ctx).Do()
1082+
pollOp, err := cloud.service.RegionOperations.Wait(project, region, opName).Context(ctx).Do()
10831083
if err != nil {
10841084
klog.Errorf("WaitForOp(op: %s, region: %#v) failed to poll the operation", opName, region)
10851085
return false, err
@@ -1091,7 +1091,7 @@ func (cloud *CloudProvider) waitForRegionalOp(ctx context.Context, project, opNa
10911091

10921092
func (cloud *CloudProvider) waitForGlobalOp(ctx context.Context, project, opName string) error {
10931093
return wait.ExponentialBackoff(WaitForOpBackoff, func() (bool, error) {
1094-
pollOp, err := cloud.service.GlobalOperations.Get(project, opName).Context(ctx).Do()
1094+
pollOp, err := cloud.service.GlobalOperations.Wait(project, opName).Context(ctx).Do()
10951095
if err != nil {
10961096
klog.Errorf("waitForGlobalOp(op: %s) failed to poll the operation", opName)
10971097
return false, err

test/k8s-integration/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ func handle() error {
636636
}
637637

638638
func generateGCETestSkip(testParams *testParameters) string {
639-
skipString := "\\[Disruptive\\]|\\[Serial\\]"
639+
skipString := "\\[Disruptive\\]|\\[Serial\\]|\\[Flaky\\]"
640640
// Skip mount options test until we fix the invalid mount options for xfs.
641641
skipString = skipString + "|csi-gcepd-sc-xfs.*provisioning.should.provision.storage.with.mount.options"
642642

@@ -672,7 +672,7 @@ func generateGCETestSkip(testParams *testParameters) string {
672672
}
673673

674674
func generateGKETestSkip(testParams *testParameters) string {
675-
skipString := "\\[Disruptive\\]|\\[Serial\\]"
675+
skipString := "\\[Disruptive\\]|\\[Serial\\]|\\[Flaky\\]"
676676

677677
curVer := mustParseVersion(testParams.clusterVersion)
678678
var nodeVer *version

0 commit comments

Comments
 (0)