Closed mtlynch closed 8 years ago
When I started this review, the build reported failure here: https://github.com/m-lab/ndt-e2e-clientworker/blob/master/tests/test_http_server.py#L61
I reran the travis check three times, and it passed two of three times; I left the third in a failed state. Is that expected?
The issue appears unrelated to these changes. Is this a flaky test?
Reviewed 7 of 7 files at r1. Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.
_tests/ndt_client_test.py, line 22 [r1] (raw file):_
nit: and optional, and out of scope for this PR. Based on the file name and this class name, I expected this to be a test, but it's a base class for other ndt client tests. My thought is that the name NdtClientTestCase
preserves the sense that it's a test case. The file name too, ndt_client_testcase.py
or ndt_client_unittest
might help distinguish this file more clearly from an actual test.
Edit: though I see that the file name convention is different than I expect; test files start with test_
rather than end with _test
. So, the file name may be clear in context.
Comments from Reviewable
I reran the travis check three times, and it passed two of three times; I left the third in a failed state. Is that expected?
The issue appears unrelated to these changes. Is this a flaky test?
Yeah, this is #43. It turns out my idea for fixing a race condition by introducing a smaller race condition didn't completely work. I have an idea for a complete elimination of the race, but I've been deferring until we get through the first run of M1 testing.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.
_tests/ndt_client_test.py, line 22 [r1] (raw file):_ Sure, I like that name better. Done.
Comments from Reviewable
This fixes a bug in that the client_wrapper was just calling close() on the Selenium driver, which closes the browser window, but does not free resources associated with the browser driver. To do that, we need to call quit().
This changes create_browser to a context manager so that callers can call it in a with block that automatically calls quit() at the end. Updates the unit tests to match.
Small refactoring of apply_patches_for_create_browser so that it's now shared between both the banjo tests and the HTML5 tests.
This change is