-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random error in with-driver-tests
#676
Comments
Thanks for raising this. I've only seen it on firefox on windows, you? |
I have seen this on MacOS as well (my own machine). I don't remember if it was Firefox or not. I did note that this time, in the CI testbed, it was Firefox. I don't know enough about the low-level details of spawning WebDriver/browsers to know if that could be the cause or not. Are you thinking that there is some state that is shared between the still-dying processes and the newly-created processes? What would that be? Things like sockets numbers aren't being reused, are they? If things are pretty isolated, I'm not sure why creating one before another terminates is an issue. You might want to look and see when the process termination code returns. Is it after things are really cleaned up, or is it returning early. To debug, you could maybe insert etaoin.api> (def driver1 (firefox))
#'etaoin.api/driver1etaoin.api>
etaoin.api> (def driver2 (firefox))
#'etaoin.api/driver2
etaoin.api> (go driver1 "http://www.google.com")
{:value nil}
etaoin.api> (go driver2 "http://www.apple.com")
{:value nil}
etaoin.api> (get-title driver1)
"Google"
etaoin.api> (get-title driver2)
"Apple" |
I'm busy with other things these days. If you have the time and interest to explore/solve, go for it! |
Just had another variant of the same issue appear as I was trying to debug it. Note in the first case, above, the exception gets thrown from
|
I'm going back through errors in prior CI runs and found this one. It's the same rough symptom as the others, but this time it happened while running test-doc. OS/browser is Windows Firefox. The relevant section from the User Guide is: ;; Start WebDriver for Firefox
(def driver (e/firefox)) ;; a Firefox window should appear
(e/driver-type driver)
;; => :firefox
;; let's perform a quick Wiki session
;; navigate to Wikipedia
(e/go driver "https://en.wikipedia.org/") The exception was thrown from within the
|
@lread , I'm going to change the title of this issue now that we know that it's not constrained to |
Also seen under Windows Firefox Babashka.
|
There's also #465 |
Version
I specifically saw this with 3b1e29c, but I've seen it before with other versions as well.
Platform
This specifically happened with the "api windows firefox jdk21" environment in the CI test harness. I don't know the platform details for that.
Symptom
There seems to be a race condition in the test that causes it to fail randomly.
Reproduction
I have not reproduced it locally. It seems to happen in the CI test suite with some regularity.
Actual behavior
Here's the relevant output from the CI test suite under task test-server:
Expected behavior
The test should pass consistently or fail with an actual hard failure, but not fail randomly.
Diagnosis
I think this is another case of the test suite kicking off an asynchronous action with the browser, the WebDriver returns to the test code, then the test code makes another WebDriver call before the browser is ready, and the browser returns something that the test code is not expecting.
The text was updated successfully, but these errors were encountered: