#27539: assertNumQueries fails if debug cursor wrapper fills
-----------------------------------+------------------------------------
     Reporter:  Malcolm Box        |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Testing framework  |                  Version:  1.10
     Severity:  Normal             |               Resolution:
     Keywords:                     |             Triage Stage:  Accepted
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+------------------------------------

Comment (by reficul31):

 Skimming over the code. I think the best solution i could think of once
 the count reaches 9000 we start removing queries from the back of the
 queue as queries_log is a deque . But I do have a question. Should the
 method to remove the queries_log be put in BaseDatabaseWrapper or can we
 just remove them manually in the CaptureQueriesContext? Or we could just
 throw an error?? But the problem will recurr and the following tests will
 also start throwing the same error.
 Replying to [comment:6 Aymeric Augustin]:
 > The test framework should clear `connection.queries` between each test.
 Do you want to clear all the queries or can it just be like a pop function
 where as a query comes in another one is deleted?

--
Ticket URL: <https://code.djangoproject.com/ticket/27539#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.66883695a081da56efe060a1fb8a83d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to