removes queries on the go so they don't get stuck on exceptions#63
removes queries on the go so they don't get stuck on exceptions#63vgrem merged 1 commit intovgrem:masterfrom
Conversation
|
@vgrem I am a bit puzzled about the failing tests. They happened on against 5.4 only, but not against HHVM. Could it be some "temporary" issue (= could you restart the tests?)? Also since the errors originate from parsing, and my changes do not affect this. Unfortunately I do not have a setup that would allow me to run the affected test files successfully 🙊 . I revised the code couple times but missed to find a scenario here a misbehavior could be triggered. Also the $queries array is protected, cannot be modified from outside (except via addQuery). Also the failing tests seem to be just too simple and common. |
|
@blizzz , indeed, it puzzled me as well. |
|
Still the same. And still odd. The trigger should be that $response is somewhat different to what is expected, that's my conclusion. The pre-condition (e.g. I'll do another dummy PR with a comment change to verify that master succeeds… Other than that thanks for looking into it :) |
Just to trigger a test run with code change as stated in vgrem#63 (comment)
|
There |
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
When one query fails with an exception, the queue is not cleared, because
ClientRequest::executeQuery()is left earlier. Thus, using the context again will always trigger this query (and also already run queries), and will always fail.Simplified use case:
Three possible solutions:
a) remove the faulty request before throwing the Exception
b) remove the current query unconditionally
c) offer a way to clean up registered queries.
I implemented
bin this PR, because it sounds most reasonable for me. Way a) would leave earlier queries in the queue, while way c) would let to a lot of unnecessary handling which is being done in one place now.@vgrem Or have the queries been kept in place for some reason?
The alternative of having a context for each file or folder object is rather nightmarish.