mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Add a timeout to scheduled pub tests.
This ensures that at least we'll know which test is timing out. Review URL: https://codereview.chromium.org//11649047 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16410 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
2ae5ab640e
commit
88af0578b6
1 changed files with 7 additions and 3 deletions
|
@ -509,6 +509,10 @@ List<_ScheduledEvent> _scheduledOnException;
|
|||
*/
|
||||
bool _abortScheduled = false;
|
||||
|
||||
/// The time (in milliseconds) to wait for the entire scheduled test to
|
||||
/// complete.
|
||||
final _TIMEOUT = 30000;
|
||||
|
||||
/**
|
||||
* Runs all the scheduled events for a test case. This should only be called
|
||||
* once per test case.
|
||||
|
@ -549,9 +553,9 @@ void run() {
|
|||
return true;
|
||||
});
|
||||
|
||||
future.chain((_) => cleanup()).then((_) {
|
||||
asyncDone();
|
||||
});
|
||||
timeout(future, _TIMEOUT, 'waiting for a test to complete')
|
||||
.chain((_) => cleanup())
|
||||
.then((_) => asyncDone());
|
||||
}
|
||||
|
||||
/// Get the path to the root "util/test/pub" directory containing the pub tests.
|
||||
|
|
Loading…
Reference in a new issue