Closed jmbowman closed 7 years ago
Well, it looks like this is a problem with selenium 3.3.1 in general (and maybe some earlier versions as well), and my fix isn't enough to reliably fix it (even though it works locally). I've added a comment to an upstream ticket which was just closed because they thought they fixed it, looking for a workaround in the meantime. It's always that same test (NeedleCleanupOnSuccessTest ) that runs afoul of it for me locally on Python 2.7, even on a fresh checkout of master with no changes applied; the test itself always passes, but the teardown fails when it tries to shut down PhantomJS twice for some reason.
Ok, this seems to be working better; sorry for the false start (both approaches fixed the problem for me in local testing). Let me know if you have any concerns with the current approach, or want me to squash the commits before merging.
That's great. Can the print statements be removed now that you've fixed the issue? Also, it'd be great if you could squash the commits. Thanks!
I switched the print statements to debug logging; without this, there's no useful information available to help debug potential regressions in the future. Let me know if you want to go ahead and remove them completely instead.
Ok I see. In this case, would it be ok to move the statement to setUp()
or tearDown()
instead of repeating it in each test method, and also add a comment to explain what it's exactly needed for?
How about this? I introduced a shared superclass for all the plugin tests which handles the logging, specifying the default test suite, and cleaning up the baseline image.
Perfect, thanks for your thorough work on this!
Some fixes I needed just to get the existing needle tests to pass reliably when run locally (extracted from #63 ):
send_remote_shutdown_command()
for the PhantomJS service and clean up after it before callingdriver.quit()
; otherwise it sometimes gets called twice, throws an exception the second time, and leaves an orphaned process sitting around consuming CPU cycles. This is a workaround for this upstream selenium issue, which apparently isn't fixed in 3.3.1 as claimed.tearDownClass
, soself.nose.success
was False but there was no indication of why. This output is only shown in the console when the test actually fails, so it doesn't clutter up successful test runs. Some of the tests in my previous PR were still failing like this in Travis with no useful feedback, so hopefully this will help debug any remaining issues.For reference, the exact traceback I was getting consistently for NeedleCleanupOnSuccessTest under Python 2.7: