Revert "Sync all pods with store before starting RC Manager."
This reverts commit 1b93ee7b35.
This commit is contained in:
@@ -892,27 +892,3 @@ func TestOverlappingRCs(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRCManagerInit(t *testing.T) {
|
||||
// Insert a stable rc into the replication manager's store and make sure
|
||||
// it syncs pods with the apiserver before making any decisions.
|
||||
rc := newReplicationController(2)
|
||||
response := runtime.EncodeOrDie(testapi.Default.Codec(), newPodList(nil, 2, api.PodRunning, rc))
|
||||
fakeHandler := utiltesting.FakeHandler{
|
||||
StatusCode: 200,
|
||||
ResponseBody: response,
|
||||
}
|
||||
testServer := httptest.NewServer(&fakeHandler)
|
||||
// TODO: Uncomment when fix #19254
|
||||
// defer testServer.Close()
|
||||
|
||||
c := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}})
|
||||
manager := NewReplicationManager(c, controller.NoResyncPeriodFunc, BurstReplicas)
|
||||
manager.rcStore.Store.Add(rc)
|
||||
manager.podStoreSynced = alwaysReady
|
||||
controller.SyncAllPodsWithStore(manager.kubeClient, manager.podStore.Store)
|
||||
fakePodControl := &controller.FakePodControl{}
|
||||
manager.podControl = fakePodControl
|
||||
manager.syncReplicationController(getKey(rc, t))
|
||||
validateSyncReplication(t, fakePodControl, 0, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user