fix scheduler test and controller spy test