-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Bug report: Race condition when the url contains input encoding that sometimes makes UI tests fail #1773
Comments
This goes even further.. Additionally, I see that the I was able to get rid of the error by making I think there are more race conditions, for example when a previous bake takes longer than the new one and overwrites the output content with stale output.. |
Also since the |
Thanks very much for your work on diagnosing this. I've made a lot of changes to the execution flow and triggers over the last year and I'm not at all surprised that there are some race conditions caused by the added complexity. Thank you for spotting some of them! I've removed the concept of I've also removed the I have reverted the changes you made to the Thanks once again for digging into this - it's non-trivial and you explained it well. |
@n1474335 The problem is that I've unfortunately introduced another UI test failure with the cancel on autobake PR, and I wasn't able to reproduce it at all.. it only happens when the tests are run. |
IOW, silent equal to false inhibits emitting statechange after 20ms, so it's not equal to inhibiting emitting statechange now |
(I'm not sure about this analysis and how that should be fixed hence I submit this as an issue not a PR)
In the
loadUriParams
function we see the following code:The
chrEncChange
function in turn callsinputChange
:Note that at the time this is called, the input is empty.. (edit: or not changed)
Then inside
inputChange
we have a debounce call which actually works like setTimeout. Since the doc is empty, this function will be called after 20ms and will callupdateInputValue
with the current value of the input:And here's the problem... by the time this is called, the input might not yet be ready, hence we overwrite the input value with the previous one / empty string.
This makes the "Loading from URL" test fail on my machine, although not always. It's easier to reproduce if the "delay" is artificially lowered to 1.
Would it make sense to create a separate parameter for chrEncChange whether to skip calling inputChange?
The text was updated successfully, but these errors were encountered: