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

Unified Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 667763005: Make incremental tests time out faster. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41480. Created 6 years, 1 month 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 | « dart/tests/try/try.status ('k') | dart/tests/try/web/sandbox.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/web/incremental_compilation_update_test.dart
diff --git a/dart/tests/try/web/incremental_compilation_update_test.dart b/dart/tests/try/web/incremental_compilation_update_test.dart
index db2e40adbb873deed97cf31f1041d167686db8f5..70ff478f030bc503fc9a07f892501315e122a4e5 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -22,6 +22,8 @@ import 'web_compiler_test_case.dart' show
import 'program_result.dart';
+const int TIMEOUT = 100;
+
const List<List<ProgramResult>> tests = const <List<ProgramResult>>[
// Basic hello-world test.
const <ProgramResult>[
@@ -203,7 +205,7 @@ Future compileAndRun(List<ProgramResult> programs) {
Uri uri = test.scriptUri.resolve('?v${version++}');
inputProvider.cachedSources[uri] = new Future.value(program.code);
Future future = test.incrementalCompiler.compileUpdates(
- {test.scriptUri: uri}, logVerbose: print, logTime: print);
+ {test.scriptUri: uri}, logVerbose: logger, logTime: logger);
return future.then((String update) {
print({'update': update});
iframe.contentWindow.postMessage(['apply-update', update], '*');
@@ -221,3 +223,13 @@ Future compileAndRun(List<ProgramResult> programs) {
iframe.remove();
});
}
+
+void logger(x) {
+ print(x);
+ bool isCheckedMode = false;
+ assert(isCheckedMode = true);
+ int timeout = isCheckedMode ? TIMEOUT * 2 : TIMEOUT;
+ if (listener.elapsed > timeout) {
+ throw 'Test timed out.';
+ }
+}
« no previous file with comments | « dart/tests/try/try.status ('k') | dart/tests/try/web/sandbox.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698