<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Hixie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Hixie">@Hixie</a></p>
<p dir="auto">Trying to land <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="334953784" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/18725" data-hovercard-type="pull_request" data-hovercard-url="/flutter/flutter/pull/18725/hovercard" href="https://github.com/flutter/flutter/pull/18725">#18725</a> and ran into a flake on AppVeyor in this test at least twice:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="⏩ RUNNING: cd dev\automated_tests; ..\..\bin\flutter.bat test test_smoke_test\timeout_pass_test.dart
00:11 +0: flutter_test timeout logic - addTime - positive                                                                                                                                              
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TimeoutException was thrown running a test:
TimeoutException after 0:00:04.000000: The test exceeded the timeout. It may have hung.
Consider using &quot;addTime&quot; to increase the timeout before expensive operations.
When the exception was thrown, this was the stack:
#2      AutomatedTestWidgetsFlutterBinding._checkTimeout (package:flutter_test/src/binding.dart:786:25)
#16     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#17     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#18     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#22     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:836:25)
#23     testWidgets.&lt;anonymous closure&gt; (package:flutter_test/src/widget_tester.dart:68:22)
#24     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:161:27)
#27     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:0:0)
#28     Invoker.waitForOutstandingCallbacks.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:249:15)
#34     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:402:15)
(elided 24 frames from package dart:async and package stack_trace)
The test description was:
flutter_test timeout logic - addTime - positive
════════════════════════════════════════════════════════════════════════════════════════════════════
00:11 +0 -1: flutter_test timeout logic - addTime - positive [E]                                                                                                                                       
  Test failed. See exception logs above.
  The test description was: flutter_test timeout logic - addTime - positive
  
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
'package:flutter_test/src/binding.dart': Failed assertion: line 873 pos 12: '_currentFakeAsync !=
null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
#2      AutomatedTestWidgetsFlutterBinding.asyncBarrier (package:flutter_test/src/binding.dart)
#3      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:519:5)
&lt;asynchronous suspension&gt;
#6      TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:502:14)
#7      AutomatedTestWidgetsFlutterBinding.runTest.&lt;anonymous closure&gt; (package:flutter_test/src/binding.dart:846:24)
#13     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:843:15)
00:11 +0 -1: Some tests failed.                                                                                                                                                                        
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 1 (expected: zero).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"><pre class="notranslate"><code class="notranslate">⏩ RUNNING: cd dev\automated_tests; ..\..\bin\flutter.bat test test_smoke_test\timeout_pass_test.dart
00:11 +0: flutter_test timeout logic - addTime - positive                                                                                                                                              
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TimeoutException was thrown running a test:
TimeoutException after 0:00:04.000000: The test exceeded the timeout. It may have hung.
Consider using "addTime" to increase the timeout before expensive operations.
When the exception was thrown, this was the stack:
#2      AutomatedTestWidgetsFlutterBinding._checkTimeout (package:flutter_test/src/binding.dart:786:25)
#16     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#17     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#18     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#22     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:836:25)
#23     testWidgets.&lt;anonymous closure&gt; (package:flutter_test/src/widget_tester.dart:68:22)
#24     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:161:27)
#27     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:0:0)
#28     Invoker.waitForOutstandingCallbacks.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:249:15)
#34     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:402:15)
(elided 24 frames from package dart:async and package stack_trace)
The test description was:
flutter_test timeout logic - addTime - positive
════════════════════════════════════════════════════════════════════════════════════════════════════
00:11 +0 -1: flutter_test timeout logic - addTime - positive [E]                                                                                                                                       
  Test failed. See exception logs above.
  The test description was: flutter_test timeout logic - addTime - positive
  
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
'package:flutter_test/src/binding.dart': Failed assertion: line 873 pos 12: '_currentFakeAsync !=
null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
#2      AutomatedTestWidgetsFlutterBinding.asyncBarrier (package:flutter_test/src/binding.dart)
#3      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:519:5)
&lt;asynchronous suspension&gt;
#6      TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:502:14)
#7      AutomatedTestWidgetsFlutterBinding.runTest.&lt;anonymous closure&gt; (package:flutter_test/src/binding.dart:846:24)
#13     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:843:15)
00:11 +0 -1: Some tests failed.                                                                                                                                                                        
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 1 (expected: zero).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
</code></pre></div>
<p dir="auto">The <a href="https://github.com/flutter/flutter/blob/d6465c477ab5123e61b57f560eca96128226683e/dev/automated_tests/test_smoke_test/timeout_pass_test.dart#L10">test code</a> seems to suggest that this is just a case of AppVeyor's dart run not being quite fast enough sometimes to get in under the timeout (only 500ms of wiggle room).</p>
<p dir="auto">I'll try giving it more wiggle room, but this sort of timing test depending on a real clock always has the potential to flake.</p>
<p dir="auto">Full log: <a href="https://ci.appveyor.com/project/flutter/flutter/build/1.0.14468" rel="nofollow">https://ci.appveyor.com/project/flutter/flutter/build/1.0.14468</a></p>
<p dir="auto">Failed after landing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="331993568" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/18453" data-hovercard-type="pull_request" data-hovercard-url="/flutter/flutter/pull/18453/hovercard" href="https://github.com/flutter/flutter/pull/18453">#18453</a>, went green on retry.</p>
<p dir="auto"><a href="https://ci.appveyor.com/project/flutter/flutter/build/1.0.14160" rel="nofollow">https://ci.appveyor.com/project/flutter/flutter/build/1.0.14160</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="⏩ RUNNING: cd dev\automated_tests; ..\..\bin\flutter.bat test test_smoke_test\timeout_pass_test.dart
00:11 +0: flutter_test timeout logic - addTime - positive                                                                                                                                              
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TimeoutException was thrown running a test:
TimeoutException after 0:00:04.000000: The test exceeded the timeout. It may have hung.
Consider using &quot;addTime&quot; to increase the timeout before expensive operations.
When the exception was thrown, this was the stack:
#2      AutomatedTestWidgetsFlutterBinding._checkTimeout (package:flutter_test/src/binding.dart:786:25)
#16     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#17     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#18     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#22     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:836:25)
#23     testWidgets.&lt;anonymous closure&gt; (package:flutter_test/src/widget_tester.dart:65:22)
#24     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:161:27)
#27     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:0:0)
#28     Invoker.waitForOutstandingCallbacks.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:249:15)
#33     Invoker.waitForOutstandingCallbacks.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:246:14)
#38     Invoker.waitForOutstandingCallbacks (package:test/src/backend/invoker.dart:246:5)
#39     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:159:33)
#44     Declarer.test.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:158:13)
#49     Declarer.test.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:143:57)
#50     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:403:25)
#55     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:402:22)
#69     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#70     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#71     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#77     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:402:15)
#82     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:389:18)
#87     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:389:9)
#88     Invoker._guardIfGuarded (package:test/src/backend/invoker.dart:443:15)
#89     Invoker._onRun.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:388:7)
#96     Invoker._onRun (package:test/src/backend/invoker.dart:387:11)
#97     LiveTestController._run (package:test/src/backend/live_test_controller.dart:188:5)
#98     _LiveTest.run (package:test/src/backend/live_test_controller.dart:40:31)
#99     RemoteListener._runLiveTest.&lt;anonymous closure&gt; (package:test/src/runner/remote_listener.dart:257:16)
#104    RemoteListener._runLiveTest (package:test/src/runner/remote_listener.dart:256:5)
#105    RemoteListener._serializeTest.&lt;anonymous closure&gt; (package:test/src/runner/remote_listener.dart:209:7)
#123    _GuaranteeSink.add (package:stream_channel/src/guarantee_channel.dart:121:12)
#124    new _MultiChannel.&lt;anonymous closure&gt; (package:stream_channel/src/multi_channel.dart:154:31)
#150    new _WebSocketImpl._fromSocket.&lt;anonymous closure&gt; (dart:_http/websocket_impl.dart:1128:21)
#156    _WebSocketProtocolTransformer._messageFrameEnd (dart:_http/websocket_impl.dart:334:22)
#157    _WebSocketProtocolTransformer.add (dart:_http/websocket_impl.dart:229:46)
#165    _Socket._onData (dart:io/runtime/binsocket_patch.dart:1672:41)
#172    new _RawSocket.&lt;anonymous closure&gt; (dart:io/runtime/binsocket_patch.dart:1245:33)
#173    _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:797:14)
(elided 137 frames from package dart:async and package stack_trace)
The test description was:
flutter_test timeout logic - addTime - positive
════════════════════════════════════════════════════════════════════════════════════════════════════
00:11 +0 -1: flutter_test timeout logic - addTime - positive [E]                                                                                                                                       
  Test failed. See exception logs above.
  The test description was: flutter_test timeout logic - addTime - positive
  
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
'package:flutter_test/src/binding.dart': Failed assertion: line 872 pos 12: '_currentFakeAsync !=
null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
00:11 +0 -1: Some tests failed.                                                                                                                                                                        
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 1 (expected: zero).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"><pre class="notranslate"><code class="notranslate">⏩ RUNNING: cd dev\automated_tests; ..\..\bin\flutter.bat test test_smoke_test\timeout_pass_test.dart
00:11 +0: flutter_test timeout logic - addTime - positive                                                                                                                                              
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TimeoutException was thrown running a test:
TimeoutException after 0:00:04.000000: The test exceeded the timeout. It may have hung.
Consider using "addTime" to increase the timeout before expensive operations.
When the exception was thrown, this was the stack:
#2      AutomatedTestWidgetsFlutterBinding._checkTimeout (package:flutter_test/src/binding.dart:786:25)
#16     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#17     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#18     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#22     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:836:25)
#23     testWidgets.&lt;anonymous closure&gt; (package:flutter_test/src/widget_tester.dart:65:22)
#24     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:161:27)
#27     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:0:0)
#28     Invoker.waitForOutstandingCallbacks.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:249:15)
#33     Invoker.waitForOutstandingCallbacks.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:246:14)
#38     Invoker.waitForOutstandingCallbacks (package:test/src/backend/invoker.dart:246:5)
#39     Declarer.test.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:159:33)
#44     Declarer.test.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:158:13)
#49     Declarer.test.&lt;anonymous closure&gt; (package:test/src/backend/declarer.dart:143:57)
#50     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:403:25)
#55     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:402:22)
#69     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#70     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#71     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#77     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:402:15)
#82     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:389:18)
#87     Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:389:9)
#88     Invoker._guardIfGuarded (package:test/src/backend/invoker.dart:443:15)
#89     Invoker._onRun.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:388:7)
#96     Invoker._onRun (package:test/src/backend/invoker.dart:387:11)
#97     LiveTestController._run (package:test/src/backend/live_test_controller.dart:188:5)
#98     _LiveTest.run (package:test/src/backend/live_test_controller.dart:40:31)
#99     RemoteListener._runLiveTest.&lt;anonymous closure&gt; (package:test/src/runner/remote_listener.dart:257:16)
#104    RemoteListener._runLiveTest (package:test/src/runner/remote_listener.dart:256:5)
#105    RemoteListener._serializeTest.&lt;anonymous closure&gt; (package:test/src/runner/remote_listener.dart:209:7)
#123    _GuaranteeSink.add (package:stream_channel/src/guarantee_channel.dart:121:12)
#124    new _MultiChannel.&lt;anonymous closure&gt; (package:stream_channel/src/multi_channel.dart:154:31)
#150    new _WebSocketImpl._fromSocket.&lt;anonymous closure&gt; (dart:_http/websocket_impl.dart:1128:21)
#156    _WebSocketProtocolTransformer._messageFrameEnd (dart:_http/websocket_impl.dart:334:22)
#157    _WebSocketProtocolTransformer.add (dart:_http/websocket_impl.dart:229:46)
#165    _Socket._onData (dart:io/runtime/binsocket_patch.dart:1672:41)
#172    new _RawSocket.&lt;anonymous closure&gt; (dart:io/runtime/binsocket_patch.dart:1245:33)
#173    _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:797:14)
(elided 137 frames from package dart:async and package stack_trace)
The test description was:
flutter_test timeout logic - addTime - positive
════════════════════════════════════════════════════════════════════════════════════════════════════
00:11 +0 -1: flutter_test timeout logic - addTime - positive [E]                                                                                                                                       
  Test failed. See exception logs above.
  The test description was: flutter_test timeout logic - addTime - positive
  
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
'package:flutter_test/src/binding.dart': Failed assertion: line 872 pos 12: '_currentFakeAsync !=
null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
00:11 +0 -1: Some tests failed.                                                                                                                                                                        
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 1 (expected: zero).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
</code></pre></div>