controller: Fix race in scheduler tests

Signed-off-by: Lewis Marshall <lewis@lmars.net>