-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: annoyanceRepeatedly frustrating issues with non-experimental functionalityRepeatedly frustrating issues with non-experimental functionalitya: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)from: studyReported in a UX studyReported in a UX studyt: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Isolates spawned using "compute" don't execute properly while executed in an integration test which in turn results in incorrect app behavior.
How to reproduce:
- use example from https://flutter.io/docs/cookbook/testing/integration
- in lib/main.dart
- add:
import 'package:flutter/foundation.dart';
- add function:
String _test(String s) {
return s;
}- modify _incrementCounter function:
void _incrementCounter() async {
final s = await compute(_test, 'hello');
print(s);
setState(() {
_counter++;
});
}The app works properly when executing flutter run, but the integration test fails (flutter drive --target=test_driver/app.dart)
The-Redhat, OmgDef, OliverWelther, shyndman, knaeckeKami and 48 morelongravuth, hainguyen168, tomrozb and deremakif
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: annoyanceRepeatedly frustrating issues with non-experimental functionalityRepeatedly frustrating issues with non-experimental functionalitya: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)from: studyReported in a UX studyReported in a UX studyt: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.