Print 50000$ monopoly money (#27531)

This commit is contained in:
xster
2019-02-05 15:00:51 -08:00
committed by GitHub
parent 9abe4c6dfe
commit 36c5e321a5
20 changed files with 113 additions and 77 deletions

View File

@@ -5,6 +5,7 @@
import 'dart:async';
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:vm_service_lib/vm_service_lib.dart';
@@ -76,10 +77,10 @@ void main() {
},
);
await _flutter.resume(); // we start paused so we can set up our TICK 1 listener before the app starts
sawTick1.future.timeout( // ignore: unawaited_futures
unawaited(sawTick1.future.timeout(
const Duration(seconds: 5),
onTimeout: () { print('The test app is taking longer than expected to print its synchronization line...'); },
);
));
await sawTick1.future; // after this, app is in steady state
await _flutter.addBreakpoint(
_project.scheduledBreakpointUri,

View File

@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:convert';
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:meta/meta.dart';
@@ -104,10 +105,10 @@ abstract class FlutterTestDriver {
// This class doesn't use the result of the future. It's made available
// via a getter for external uses.
_process.exitCode.then((int code) { // ignore: unawaited_futures
unawaited(_process.exitCode.then((int code) {
_debugPrint('Process exited ($code)');
_hasExited = true;
});
}));
transformToLines(_process.stdout).listen((String line) => _stdout.add(line));
transformToLines(_process.stderr).listen((String line) => _stderr.add(line));