Commit a8aff388 authored by Carlo Bernaschina's avatar Carlo Bernaschina Committed by GitHub

Add log to understand flakiness of commands_test (#11720)

The flakiness of commands_test is generally visible via:

```
drive:stdout:   Expected: 'log: paint'
drive:stdout:     Actual: ''
drive:stdout:      Which: is different. Both strings start the same, but the actual value is missing the following trailing characters: log: paint ...
```

By returning the name of the test we will be able to understand if
another test is running by reading the `Actual` value
parent 7c3a45dc
......@@ -7,7 +7,10 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_driver/driver_extension.dart';
void main() {
enableFlutterDriverExtension();
enableFlutterDriverExtension(handler: (String message) async {
// TODO(cbernaschina) remove when test flakiness is resolved
return 'driver';
});
runApp(new DriverTestApp());
}
......
......@@ -8,7 +8,10 @@ import 'package:flutter_driver/driver_extension.dart';
import 'keys.dart' as keys;
void main() {
enableFlutterDriverExtension();
enableFlutterDriverExtension(handler: (String message) async {
// TODO(cbernaschina) remove when test flakiness is resolved
return 'keyboard_resize';
});
runApp(new MyApp());
}
......
......@@ -324,7 +324,7 @@ class FlutterDriverExtension {
Future<RequestDataResult> _requestData(Command command) async {
final RequestData requestDataCommand = command;
return new RequestDataResult(_requestDataHandler == null ? '' : await _requestDataHandler(requestDataCommand.message));
return new RequestDataResult(_requestDataHandler == null ? 'No requestData Extension registered' : await _requestDataHandler(requestDataCommand.message));
}
Future<SetFrameSyncResult> _setFrameSync(Command command) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment