Always overwrite items in kubelet's work queue

This allows kubelet to change the next sync time based on the last result.
This commit is contained in:
Yu-Ju Hong
2015-12-21 09:08:18 -08:00
parent 73a4f8225c
commit 4ab505606b
2 changed files with 2 additions and 20 deletions

View File

@@ -63,15 +63,3 @@ func TestGetWork(t *testing.T) {
compareResults(t, expected, q.GetWork())
compareResults(t, []types.UID{}, q.GetWork())
}
func TestEnqueueKeepGreaterTimestamp(t *testing.T) {
q, _ := newTestBasicWorkQueue()
item := types.UID("foo")
q.Enqueue(item, -7*time.Hour)
q.Enqueue(item, 3*time.Hour)
compareResults(t, []types.UID{}, q.GetWork())
q.Enqueue(item, 3*time.Hour)
q.Enqueue(item, -7*time.Hour)
compareResults(t, []types.UID{}, q.GetWork())
}