Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forEach tests using a stopwatch are flaky #30

Closed
natebosch opened this issue Feb 21, 2019 · 0 comments
Closed

forEach tests using a stopwatch are flaky #30

natebosch opened this issue Feb 21, 2019 · 0 comments
Assignees

Comments

@natebosch
Copy link
Member

@natebosch natebosch commented Feb 21, 2019

For example:

pool/test/pool_test.dart

Lines 558 to 561 in 90eab06

expect((watch.elapsed ~/ itemCount).inMicroseconds,
lessThan(expectedElapsed / (poolSize - otherTaskCount)),
reason: 'Average time per task should be '
'proportionate to the available pool resources.');

Example failure:

Expected: a value less than <476.1904761904762>...
Expected: a value less than <476.1904761904762>
  Actual: <542>
   Which: is not a value less than <476.1904761904762>
Average time per task should be proportionate to the available pool resources.
package:test_api                                             expect
google3:///third_party/dart/pool/test/pool_test.dart 558:15  main.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async                                                   _AsyncAwaitCompleter.completeError
google3:///third_party/dart/pool/test/pool_test.dart         main.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async                                                   _asyncThenWrapperHelper
google3:///third_party/dart/pool/test/pool_test.dart         main.<fn>.<fn>.<fn>

My guess is the host happened to run a bit slow, or we hit GC, or something like that. We either need to split these out into a separate performance test file that we can avoid running most of the time, or we need to make it less sensitive to whatever might cause it to spike.

kevmoo added a commit that referenced this issue Feb 24, 2019
@kevmoo kevmoo closed this in #31 Feb 25, 2019
kevmoo added a commit that referenced this issue Feb 25, 2019
Fixes #30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.