Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Issue 12251012: Add built-in timeouts to scheduled_test. (Closed)

Created:
7 years, 10 months ago by nweiz
Modified:
7 years, 10 months ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add built-in timeouts to scheduled_test. Unlike r18363, this mocks out the Timer class to provide more deterministic behavior when running tests on slow computers. BUG=8511 Committed: https://code.google.com/p/dart/source/detail?r=18429

Patch Set 1 #

Total comments: 4

Patch Set 2 : Timer API changes #

Patch Set 3 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+731 lines, -108 lines) Patch
M pkg/scheduled_test/lib/scheduled_test.dart View 1 2 chunks +13 lines, -1 line 0 comments Download
A pkg/scheduled_test/lib/src/mock_clock.dart View 1 2 1 chunk +105 lines, -0 lines 0 comments Download
M pkg/scheduled_test/lib/src/schedule.dart View 1 2 14 chunks +154 lines, -21 lines 0 comments Download
M pkg/scheduled_test/lib/src/schedule_error.dart View 3 chunks +20 lines, -13 lines 0 comments Download
A pkg/scheduled_test/lib/src/substitute_future.dart View 1 chunk +54 lines, -0 lines 0 comments Download
M pkg/scheduled_test/lib/src/utils.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M pkg/scheduled_test/test/metatest.dart View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/scheduled_test/test/scheduled_test_test.dart View 1 7 chunks +213 lines, -24 lines 0 comments Download
A pkg/scheduled_test/test/substitute_future_test.dart View 1 chunk +154 lines, -0 lines 0 comments Download
M pkg/scheduled_test/test/utils.dart View 1 2 2 chunks +10 lines, -48 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
nweiz
7 years, 10 months ago (2013-02-13 01:21:46 UTC) #1
Bob Nystrom
LGTM. https://codereview.chromium.org/12251012/diff/1/pkg/scheduled_test/lib/src/mock_clock.dart File pkg/scheduled_test/lib/src/mock_clock.dart (right): https://codereview.chromium.org/12251012/diff/1/pkg/scheduled_test/lib/src/mock_clock.dart#newcode36 pkg/scheduled_test/lib/src/mock_clock.dart:36: Timer getTimer(int ms, TimerCallback callback) => "get" -> ...
7 years, 10 months ago (2013-02-13 01:42:28 UTC) #2
Bob Nystrom
Duration changes LGTM2.
7 years, 10 months ago (2013-02-13 01:46:03 UTC) #3
nweiz
7 years, 10 months ago (2013-02-13 02:03:26 UTC) #4
https://codereview.chromium.org/12251012/diff/1/pkg/scheduled_test/lib/src/mo...
File pkg/scheduled_test/lib/src/mock_clock.dart (right):

https://codereview.chromium.org/12251012/diff/1/pkg/scheduled_test/lib/src/mo...
pkg/scheduled_test/lib/src/mock_clock.dart:36: Timer getTimer(int ms,
TimerCallback callback) =>
On 2013/02/13 01:42:28, Bob Nystrom wrote:
> "get" -> "create" or "new"

Done.

https://codereview.chromium.org/12251012/diff/1/pkg/scheduled_test/lib/src/mo...
pkg/scheduled_test/lib/src/mock_clock.dart:72: }
On 2013/02/13 01:42:28, Bob Nystrom wrote:
> Can ditch the {} here if you want.

Done.

Powered by Google App Engine
This is Rietveld 408576698