Convert scheduler tests to integration tests

Could just use `io.Closer`