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

Unified Diff: content/test/gpu/gpu_tests/gpu_integration_test.py

Issue 2151983002: Adding logic to restart the browser if there is an exception (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding removed logging statement Created 4 years, 5 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: content/test/gpu/gpu_tests/gpu_integration_test.py
diff --git a/content/test/gpu/gpu_tests/gpu_integration_test.py b/content/test/gpu/gpu_tests/gpu_integration_test.py
index 21a283be021fd1b200f1974ed6ae2319de4bd986..2f9128aacc9484a8835a4a55b6c61933e90bdb65 100644
--- a/content/test/gpu/gpu_tests/gpu_integration_test.py
+++ b/content/test/gpu/gpu_tests/gpu_integration_test.py
@@ -126,4 +126,9 @@ class GpuIntegrationTest(
raise NotImplementedError
def setUp(self):
- self.tab = self.browser.tabs[0]
+ try:
+ self.tab = self.browser.tabs[0]
+ except Exception:
+ # restart the browser to make sure a failure in a test doesn't
+ # propagate to the next test iteration.
+ self._RestartBrowser('failure in setup')
nednguyen 2016/07/14 19:04:12 We still should add "raise" after this so the exce
Ken Russell (switch to Gerrit) 2016/07/14 23:06:17 Is failing the test a good idea? setUp() is called
nednguyen 2016/07/14 23:10:01 As you mention the problem of marking test flaky &
nednguyen 2016/07/14 23:16:47 Though people can always subclass GpuIntegrationTe
Ken Russell (switch to Gerrit) 2016/07/15 01:10:37 OK. Let's start by adding: if not self.tab:
nednguyen 2016/07/15 01:39:55 We can use what's similar to https://cs.chromium.o
eyaich 2016/07/15 13:30:27 So I see one problem with this workflow. The or

Powered by Google App Engine
This is Rietveld 408576698