Merge pull request #59956 from mlmhl/fix_pv_controller_metric_e2e

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Wait for bound pvc metric updated before validating

**What this PR does / why we need it**:

We should wait for both bound pv and pvc metrics updated before validating the metric values(Currently we only wait for bound pv metric updated).

**Release note**:

```release-note
NONE
```

/sig storage
pull/6/head
Kubernetes Submit Queue 2018-02-16 12:06:10 -08:00 committed by GitHub
commit 9df102b4e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -293,6 +293,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
pv, pvc, err = framework.CreatePVPVC(c, pvConfig, pvcConfig, ns, true)
Expect(err).NotTo(HaveOccurred(), "Error creating pv pvc: %v", err)
waitForPVControllerSync(metricsGrabber, boundPVKey, classKey)
waitForPVControllerSync(metricsGrabber, boundPVCKey, namespaceKey)
validator([]map[string]int64{{className: 1}, nil, {ns: 1}, nil})
})