and waiting for two expected state changed events to arrive: "running" followed by "stopped". llvm-svn: 122380