diff --git a/lib/rob/schedulers/v0/scheduler_test.go b/lib/rob/schedulers/v0/scheduler_test.go index 7d6608b2f2543b50eb59b5a0c82cbb8d169f84dc..17fdd831efdeae6ab607f779eeada848357a71a9 100644 --- a/lib/rob/schedulers/v0/scheduler_test.go +++ b/lib/rob/schedulers/v0/scheduler_test.go @@ -342,3 +342,28 @@ func TestScheduler_IdleWake(t *testing.T) { t.Log("share of 0:", t0) } + +func TestScheduler_LateSink(t *testing.T) { + var table ShareTable + sched := NewScheduler() + + go testSource(sched, 0, 10*time.Millisecond, 0) + + time.Sleep(10 * time.Second) + + testSink(sched, &table, 0) + + time.Sleep(10 * time.Second) + t0 := table.Get(0) + + /* + Expectations: + - 0 should have some executions + */ + + if t0 == 0 { + t.Error("expected executions to be greater than 0 (is backlog broken?)") + } + + t.Log("share of 0:", t0) +}