k3s/pkg/kubelet/deviceplugin
Kubernetes Submit Queue 16e42282d3 Merge pull request #53028 from jiayingz/flaky-test
Automatic merge from submit-queue (batch tested with PRs 53044, 52956, 53512, 53028). 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>.

Fixes the flaky TestDevicePluginReRegistration.

In the current test, there is a race that the new device plugin endpoint
may not be added to the device plugin manager endpoints at the time when
we call manager.Devices(). Added the checking and waiting for endpoint
updates before calling manager.Devices() in the test.

Tested:
go test -race -count 500 k8s.io/kubernetes/pkg/kubelet/deviceplugin -run
TestDevicePluginReRegistration -timeout 5h



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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubernetes/issues/52560

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-05 18:29:44 -07:00
..
BUILD Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
OWNERS Add an OWNERS file for deviceplugin package. Update OWNERS file for gpu package. 2017-09-05 13:46:13 -07:00
device_plugin_stub.go Fixes some races in deviceplugin manager_test.go and manager.go. 2017-09-18 13:19:51 -07:00
endpoint.go Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
endpoint_test.go Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
manager.go Fixes some races in deviceplugin manager_test.go and manager.go. 2017-09-18 13:19:51 -07:00
manager_test.go Fixes the flaky TestDevicePluginReRegistration. 2017-09-25 16:55:29 -07:00
types.go Extends device_plugin_handler to checkpoint device to container allocation information. 2017-09-05 09:52:14 -07:00
utils.go Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
utils_test.go Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00