Don't treat stderr output as failures during DAP test teardown (#94335)

This commit is contained in:
Danny Tuppeny
2021-12-01 15:19:04 +00:00
committed by GitHub
parent 90f93a5ad0
commit b865e23aeb

View File

@@ -73,13 +73,16 @@ class OutOfProcessDapTestServer extends DapTestServer {
Logger? logger,
) {
// Treat anything written to stderr as the DAP crashing and fail the test
// unless it's "Waiting for another flutter command to release the startup lock".
// unless it's "Waiting for another flutter command to release the startup
// lock" or we're tearing down.
_process.stderr
.transform(utf8.decoder)
.where((String error) => !error.contains('Waiting for another flutter command to release the startup lock'))
.listen((String error) {
logger?.call(error);
throw error;
if (!_isShuttingDown) {
throw error;
}
});
unawaited(_process.exitCode.then((int code) {
final String message = 'Out-of-process DAP server terminated with code $code';