Convert scheduler tests to integration tests

Do we need an `os.Exit` here?