Fix "Kubelet doesn't kill old pods when BoundPods is empty" issue

This commit is contained in:
saadali
2015-01-08 23:01:07 -08:00
parent 969c4b8c49
commit e1917cf900
6 changed files with 25 additions and 6 deletions

View File

@@ -92,8 +92,14 @@ func TestUpdateOnNonExistentFile(t *testing.T) {
NewSourceFile("random_non_existent_path", time.Millisecond, ch)
select {
case got := <-ch:
t.Errorf("Expected no update, Got %#v", got)
update := got.(kubelet.PodUpdate)
expected := CreatePodUpdate(kubelet.SET, kubelet.FileSource)
if !api.Semantic.DeepEqual(expected, update) {
t.Fatalf("Expected %#v, Got %#v", expected, update)
}
case <-time.After(2 * time.Millisecond):
t.Errorf("Expected update, timeout instead")
}
}