
This test is sometimes flaky (#20822) because the two processes try to stop the same app. This fix changes to just gracefully terminate the attach process without explicitly trying to stop and then uses the original spawning process to stop the app. I can't repro the flake locally to be certain, but I've verified only one stop command is sent now so it *should* be good.
Flutter Tools
Tools for building Flutter applications.
To run the tests, ensure that no devices are connected,
then navigate to flutter_tools
and execute:
../../bin/cache/dart-sdk/bin/pub run test -j1