Merge pull request #101757 from pacoxu/test-fix-registry

compare the func with .Pointer() in scheduler registry-test
This commit is contained in:
Kubernetes Prow Robot
2021-05-06 20:59:03 -07:00
committed by GitHub

View File

@@ -76,7 +76,7 @@ func TestDecodeInto(t *testing.T) {
func isRegistryEqual(registryX, registryY Registry) bool {
for name, pluginFactory := range registryY {
if val, ok := registryX[name]; ok {
if reflect.ValueOf(pluginFactory) != reflect.ValueOf(val) {
if reflect.ValueOf(pluginFactory).Pointer() != reflect.ValueOf(val).Pointer() {
// pluginFactory functions are not the same.
return false
}