Change:
Which jobs are flaking: ci-kubernetes-integration-master pull-kubernetes-integration Which test(s) are flaking: TestPostBindPlugin Testgrid link: Reason for failure: Anything else we need to know: links to appreciated: links to specific failures in spyglass appreciated /sig scheduling
It flaked two times recently:

Discussion:
// TestPostBindPlugin tests invocation of postbind plugins. func TestPostBindPlugin(t *testing.T) { <del> // Create a plugin registry for testing. Register a prebind and a postbind plugin. preBindPlugin := &PreBindPlugin{} postBindPlugin := &PostBindPlugin{name: postBindPluginName} registry := frameworkruntime.Registry{ preBindPluginName:  newPlugin(preBindPlugin), postBindPluginName: newPlugin(postBindPlugin), } // Setup initial prebind and postbind plugin for testing. prof := schedulerconfig.KubeSchedulerProfile{ SchedulerName: v1.DefaultSchedulerName, Plugins: &schedulerconfig.Plugins{ PreBind: &schedulerconfig.PluginSet{ Enabled: []schedulerconfig.Plugin{ { Name: preBindPluginName, }, }, }, PostBind: &schedulerconfig.PluginSet{ Enabled: []schedulerconfig.Plugin{ { Name: postBindPluginName, }, }, }, }, } // Create the master and the scheduler with the test plugin set. testCtx := initTestSchedulerForFrameworkTest(t, testutils.InitTestMaster(t, "postbind-plugin", nil), 2, scheduler.WithProfiles(prof), scheduler.WithFrameworkOutOfTreeRegistry(registry)) defer testutils.CleanupTest(t, testCtx) </del> tests := []struct { <del> name          string preBindFail   bool preBindReject bool </del> <ins> name        string preBindFail bool </ins> }{ { name:        "plugin preBind fail",

for _, test := range tests { t.Run(test.name, func(t *testing.T) { <del> preBindPlugin.failPreBind = test.preBindFail </del> <ins> // Create a plugin registry for testing. Register a prebind and a postbind plugin. preBindPlugin := &PreBindPlugin{ failPreBind: test.preBindFail, } postBindPlugin := &PostBindPlugin{ name:                  postBindPluginName, pluginInvokeEventChan: make(chan pluginInvokeEvent, 1), } registry := frameworkruntime.Registry{ preBindPluginName:  newPlugin(preBindPlugin), postBindPluginName: newPlugin(postBindPlugin), } // Setup initial prebind and postbind plugin for testing. prof := schedulerconfig.KubeSchedulerProfile{ SchedulerName: v1.DefaultSchedulerName, Plugins: &schedulerconfig.Plugins{ PreBind: &schedulerconfig.PluginSet{ Enabled: []schedulerconfig.Plugin{ { Name: preBindPluginName, }, }, }, PostBind: &schedulerconfig.PluginSet{ Enabled: []schedulerconfig.Plugin{ { Name: postBindPluginName, }, }, }, }, } // Create the master and the scheduler with the test plugin set. testCtx := initTestSchedulerForFrameworkTest(t, testutils.InitTestMaster(t, "postbind-plugin", nil), 2, scheduler.WithProfiles(prof), scheduler.WithFrameworkOutOfTreeRegistry(registry)) defer testutils.CleanupTest(t, testCtx) </ins> // Create a best effort pod. pod, err := createPausePod(testCtx.ClientSet, initPausePod(&pausePodConfig{Name: "test-pod", Namespace: testCtx.NS.Name}))

if err = testutils.WaitForPodToSchedule(testCtx.ClientSet, pod); err != nil { t.Errorf("Expected the pod to be scheduled. error: %v", err) } <ins> select { case <-postBindPlugin.pluginInvokeEventChan: case <-time.After(time.Second * 15): t.Errorf("pluginInvokeEventChan timed out") } </ins> if postBindPlugin.numPostBindCalled == 0 { t.Errorf("Expected the postbind plugin to be called, was called %d times.", postBindPlugin.numPostBindCalled) } } <del> postBindPlugin.reset() preBindPlugin.reset() </del> testutils.CleanupPods(testCtx.ClientSet, t, []*v1.Pod{pod}) }) }