sched: Fix tests

This commit is contained in:
Łukasz Magiera 2020-10-28 14:34:28 +01:00
parent 4cf00b8b42
commit ed2f81da2f

View File

@ -591,8 +591,13 @@ func TestWindowCompact(t *testing.T) {
wh.activeWindows = append(wh.activeWindows, window) wh.activeWindows = append(wh.activeWindows, window)
} }
n := sh.workerCompactWindows(wh, WorkerID{}) sw := schedWorker{
require.Equal(t, len(start)-len(expect), n) sched: &sh,
worker: wh,
}
sw.workerCompactWindows()
require.Equal(t, len(start)-len(expect), -sw.windowsRequested)
for wi, tasks := range expect { for wi, tasks := range expect {
var expectRes activeResources var expectRes activeResources