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

Unified Diff: lib/src/backend/invoker.dart

Issue 1090513002: Support configuring timeouts per-test and -group. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/backend/declarer.dart ('k') | lib/src/backend/metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/invoker.dart
diff --git a/lib/src/backend/invoker.dart b/lib/src/backend/invoker.dart
index 057e704918cc1e64276066992b48eb151c815aa0..147741ffae9aa17265e8394cbc19c7f1ac82af99 100644
--- a/lib/src/backend/invoker.dart
+++ b/lib/src/backend/invoker.dart
@@ -158,12 +158,12 @@ class Invoker {
// TODO(nweiz): Make the timeout configurable.
// TODO(nweiz): Reset this timer whenever the user's code interacts with
// the library.
- var timer = new Timer(new Duration(seconds: 30), () {
+ var timeout = _test.metadata.timeout.apply(new Duration(seconds: 30));
+ var timer = new Timer(timeout, () {
if (liveTest.isComplete) return;
handleError(
new TimeoutException(
- "Test timed out after 30 seconds.",
- new Duration(seconds: 30)));
+ "Test timed out after ${niceDuration(timeout)}.", timeout));
});
addOutstandingCallback();
« no previous file with comments | « lib/src/backend/declarer.dart ('k') | lib/src/backend/metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698