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

Unified Diff: tools/testing/dart/test_runner.dart

Issue 9361040: Reduce flakiness of browser tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
Index: tools/testing/dart/test_runner.dart
===================================================================
--- tools/testing/dart/test_runner.dart (revision 4018)
+++ tools/testing/dart/test_runner.dart (working copy)
@@ -96,6 +96,10 @@
class BrowserTestCase extends TestCase {
String compilerPath;
List<String> compilerArguments;
+ /**
+ * Indicates if this test is a rerun, to compensate for flaky browser tests.
+ */
+ bool isRerun;
BrowserTestCase(displayName,
this.compilerPath,
@@ -118,6 +122,7 @@
'$compilerPath ${Strings.join(compilerArguments, " ")}';
commandLine = 'compilation command: $compilationCommand\n$commandLine';
}
+ isRerun = false;
}
}
@@ -206,7 +211,19 @@
stderr, new Date.now().difference(startTime));
process.close();
timeoutTimer.cancel();
- testCase.completed();
+ if (testCase.output.unexpectedOutput && testCase.configuration['verbose']) {
+ print(testCase.output.stdout);
+ print(testCase.output.stderr);
+ }
+ if (testCase is BrowserTestCase && testCase.output.unexpectedOutput &&
+ !testCase.isRerun) {
+ // Selenium tests can be flaky. Try rerunning.
+ testCase.isRerun = true;
Bill Hesse 2012/02/08 18:15:06 Can we print a message in this case? Is this the
+ this.timedOut = false;
+ this.start();
+ } else {
+ testCase.completed();
+ }
}
void compilerExitHandler(int exitCode) {

Powered by Google App Engine
This is Rietveld 408576698