Skip to content
Snippets Groups Projects
Commit adc4d853 authored by nweiz@google.com's avatar nweiz@google.com
Browse files

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@16410 260f80e4-7a28-3924-810f-c04153c831b5
parent d1926f2d
No related branches found
No related tags found
No related merge requests found
...@@ -509,6 +509,10 @@ List<_ScheduledEvent> _scheduledOnException; ...@@ -509,6 +509,10 @@ List<_ScheduledEvent> _scheduledOnException;
*/ */
bool _abortScheduled = false; 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 * Runs all the scheduled events for a test case. This should only be called
* once per test case. * once per test case.
...@@ -549,9 +553,9 @@ void run() { ...@@ -549,9 +553,9 @@ void run() {
return true; return true;
}); });
future.chain((_) => cleanup()).then((_) { timeout(future, _TIMEOUT, 'waiting for a test to complete')
asyncDone(); .chain((_) => cleanup())
}); .then((_) => asyncDone());
} }
/// Get the path to the root "util/test/pub" directory containing the pub tests. /// Get the path to the root "util/test/pub" directory containing the pub tests.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment