Skip to content

Commit

Permalink
Merge pull request kubernetes#105110 from thockin/release-1.21
Browse files Browse the repository at this point in the history
v1.21: Fix test flake in old svc registry
  • Loading branch information
k8s-ci-robot committed Sep 20, 2021
2 parents baa4fc5 + 0c05026 commit eb84221
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions test/e2e/network/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2373,15 +2373,19 @@ var _ = common.SIGDescribe("Services", func() {
framework.Logf("Service %s has service status updated", testSvcName)

ginkgo.By("patching the service")
servicePatchPayload, err := json.Marshal(v1.Service{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"test-service": "patched",
err = retry.RetryOnConflict(retry.DefaultRetry, func() error {
servicePatchPayload, err := json.Marshal(v1.Service{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"test-service": "patched",
},
},
},
})
})
framework.ExpectNoError(err, "failed to marshal patch for Service %v in namespace %v", testSvcName, ns)

_, err = svcClient.Patch(context.TODO(), testSvcName, types.StrategicMergePatchType, []byte(servicePatchPayload), metav1.PatchOptions{})
_, err = svcClient.Patch(context.TODO(), testSvcName, types.StrategicMergePatchType, []byte(servicePatchPayload), metav1.PatchOptions{})
return err
})
framework.ExpectNoError(err, "failed to patch service. %v", err)

ginkgo.By("watching for the Service to be patched")
Expand Down

0 comments on commit eb84221

Please sign in to comment.