Unverified Commit ef71d9d9 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Increase timeouts because some CI systems are REALLY SLOW. (#20396)

parent afb61377
...@@ -7,7 +7,7 @@ import 'package:flutter_test/flutter_test.dart'; ...@@ -7,7 +7,7 @@ import 'package:flutter_test/flutter_test.dart';
void main() { void main() {
testWidgets('flutter_test timeout logic - addTime - positive', (WidgetTester tester) async { testWidgets('flutter_test timeout logic - addTime - positive', (WidgetTester tester) async {
await tester.runAsync(() async { await tester.runAsync(() async {
await new Future<void>.delayed(const Duration(milliseconds: 3500)); await new Future<void>.delayed(const Duration(milliseconds: 2500)); // must be longer than default timeout.
}, additionalTime: const Duration(milliseconds: 2000)); }, additionalTime: const Duration(milliseconds: 2000)); // default timeout is 2s, so this makes it 4s.
}); });
} }
...@@ -695,7 +695,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding { ...@@ -695,7 +695,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
_currentFakeAsync.elapse(duration); _currentFakeAsync.elapse(duration);
_phase = newPhase; _phase = newPhase;
if (hasScheduledFrame) { if (hasScheduledFrame) {
addTime(const Duration(milliseconds: 100)); addTime(const Duration(milliseconds: 500));
_currentFakeAsync.flushMicrotasks(); _currentFakeAsync.flushMicrotasks();
handleBeginFrame(new Duration( handleBeginFrame(new Duration(
milliseconds: _clock.now().millisecondsSinceEpoch, milliseconds: _clock.now().millisecondsSinceEpoch,
...@@ -710,7 +710,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding { ...@@ -710,7 +710,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
@override @override
Future<T> runAsync<T>(Future<T> callback(), { Future<T> runAsync<T>(Future<T> callback(), {
Duration additionalTime = const Duration(milliseconds: 250), Duration additionalTime = const Duration(milliseconds: 1000),
}) { }) {
assert(additionalTime != null); assert(additionalTime != null);
assert(() { assert(() {
......
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