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

Issue 130173010: pkg/unittest: Run each test in a Zone (Closed)

Created:
6 years, 10 months ago by kevmoo
Modified:
6 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

pkg/unittest: Run each test in a Zone added a change log Deprecate methods with behavior subsumed by runZoned removed rerunTests updated async/future_timeout_test to not assume Zone.ROOT during test run BUG= https://code.google.com/p/dart/issues/detail?id=13277 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=32284

Patch Set 1 #

Patch Set 2 : long line #

Total comments: 16

Patch Set 3 : changelog #

Patch Set 4 : removed rerunTests and unused sentinal #

Patch Set 5 : changelog nits #

Patch Set 6 : TODO for explaining async error in a more clear way #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -48 lines) Patch
A pkg/unittest/CHANGELOG.md View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M pkg/unittest/lib/src/spread_args_helper.dart View 1 2 3 2 chunks +11 lines, -1 line 0 comments Download
M pkg/unittest/lib/unittest.dart View 1 2 3 4 5 5 chunks +33 lines, -42 lines 0 comments Download
M pkg/unittest/test/unittest_invalid_ops_test.dart View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M pkg/unittest/test/unittest_protect_async_test.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M tests/lib/async/future_timeout_test.dart View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
kevmoo
6 years, 10 months ago (2014-02-04 02:00:31 UTC) #1
Siggi Cherem (dart-lang)
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/src/spread_args_helper.dart File pkg/unittest/lib/src/spread_args_helper.dart (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/src/spread_args_helper.dart#newcode124 pkg/unittest/lib/src/spread_args_helper.dart:124: _guardAsync(Function tryBody, Function finallyBody, TestCase testCase) { I thought ...
6 years, 10 months ago (2014-02-04 02:20:05 UTC) #2
kevmoo
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/src/spread_args_helper.dart File pkg/unittest/lib/src/spread_args_helper.dart (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/src/spread_args_helper.dart#newcode124 pkg/unittest/lib/src/spread_args_helper.dart:124: _guardAsync(Function tryBody, Function finallyBody, TestCase testCase) { On 2014/02/04 ...
6 years, 10 months ago (2014-02-04 02:26:17 UTC) #3
nweiz
lgtm https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/CHANGELOG.md File pkg/unittest/CHANGELOG.md (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/CHANGELOG.md#newcode1 pkg/unittest/CHANGELOG.md:1: # Changelog - unittest Mention the changes in ...
6 years, 10 months ago (2014-02-04 02:34:25 UTC) #4
kevmoo
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/CHANGELOG.md File pkg/unittest/CHANGELOG.md (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/CHANGELOG.md#newcode1 pkg/unittest/CHANGELOG.md:1: # Changelog - unittest On 2014/02/04 02:34:26, nweiz wrote: ...
6 years, 10 months ago (2014-02-04 02:41:34 UTC) #5
Siggi Cherem (dart-lang)
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/src/spread_args_helper.dart File pkg/unittest/lib/src/spread_args_helper.dart (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/src/spread_args_helper.dart#newcode124 pkg/unittest/lib/src/spread_args_helper.dart:124: _guardAsync(Function tryBody, Function finallyBody, TestCase testCase) { On 2014/02/04 ...
6 years, 10 months ago (2014-02-04 02:42:01 UTC) #6
kevmoo
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/unittest.dart File pkg/unittest/lib/unittest.dart (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/lib/unittest.dart#newcode406 pkg/unittest/lib/unittest.dart:406: return callback; On 2014/02/04 02:42:01, Siggi Cherem (dart-lang) wrote: ...
6 years, 10 months ago (2014-02-04 02:45:28 UTC) #7
kevmoo
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/test/unittest_protect_async_test.dart File pkg/unittest/test/unittest_protect_async_test.dart (right): https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/test/unittest_protect_async_test.dart#newcode42 pkg/unittest/test/unittest_protect_async_test.dart:42: 'protectAsync2:Caught Bad state: error during protectAsync2: arg1, arg2:' On ...
6 years, 10 months ago (2014-02-04 17:52:26 UTC) #8
kevmoo
Committed patchset #6 manually as r32284 (presubmit successful).
6 years, 10 months ago (2014-02-04 17:52:50 UTC) #9
Siggi Cherem (dart-lang)
6 years, 10 months ago (2014-02-04 17:59:36 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/test/unitte...
File pkg/unittest/test/unittest_protect_async_test.dart (right):

https://codereview.chromium.org/130173010/diff/30001/pkg/unittest/test/unitte...
pkg/unittest/test/unittest_protect_async_test.dart:42: 'protectAsync2:Caught Bad
state: error during protectAsync2: arg1, arg2:'
On 2014/02/04 17:52:26, kevmoo wrote:
> On 2014/02/04 02:26:18, kevmoo wrote:
> > On 2014/02/04 02:20:05, Siggi Cherem (dart-lang) wrote:
> > > can we combine this with the old message? I think it still is important
that
> > we
> > > also mention that the callback is called after the test was done.
> > 
> > Good idea. I'll look into it.
> 
> I added a TODO around this. We need to do a better way to capture and
categorize
> the classes of errors. During setUp, tearDown, and run. 'in-line' vs Future vs
> async.
> 
> https://codereview.chromium.org/130173010

Is there a way to fix this part here to show the old message instead? I think
the real reason the test is failing here is not that there is an error in
'protectAsync', but the fact that the code is running after the test is done. 

What happens currently if the callback has no errors?

Powered by Google App Engine
This is Rietveld 408576698