Descriptionchromedriver is randomly flaky. symptom: test run hangs forever when
trying to load the next browser test. this is a workaround that
avoids most of that flakiness.
for a while I was concerned that the hang might be a side effect of
the complex things we do to js, but I have a test run that hung after
browser-expectations, which is the first test, and there's nothing
particularly complicated in it, so it seems likely to be a bug in
chromedriver.
the bug seems to be mainly triggered by navigating to about:blank.
but I think I have a few instances of it failing elsewhere. I spent
some time trying to figure out the bug, but didn't get very far,
and this workaround seems adequate, so I'm deferring understanding
the real problem until later.
the workaround is to get a fresh webdriver instance for each test.
this is the way most people use webdriver, so it's likely to work
robustly in the future too.
It's slightly slower than reusing the same browser, but
not significantly slower. (The reuse-a-browser code was created
a long time ago when we had much fewer browser tests, and
browser startup time was a significant fraction of the time.
Browser startup is now an insignificant fraction of the time.)
Patch Set 1 #
Total comments: 2
MessagesTotal messages: 4
|
||||||||||||||||||||||||||||