Fix unit test

This commit is contained in:
Shiming Zhang 2023-10-24 11:01:08 +08:00
parent 13ee40c6f2
commit 35f4d29d73

View File

@ -236,12 +236,12 @@ func (m *ManagerImpl) PluginDisconnected(resourceName string) {
m.mutex.Lock()
defer m.mutex.Unlock()
if _, exists := m.endpoints[resourceName]; exists {
if ep, exists := m.endpoints[resourceName]; exists {
m.markResourceUnhealthy(resourceName)
klog.V(2).InfoS("Endpoint became unhealthy", "resourceName", resourceName, "endpoint", m.endpoints[resourceName])
}
klog.V(2).InfoS("Endpoint became unhealthy", "resourceName", resourceName, "endpoint", ep)
m.endpoints[resourceName].e.setStopTime(time.Now())
ep.e.setStopTime(time.Now())
}
}
// PluginListAndWatchReceiver receives ListAndWatchResponse from a device plugin