#22420: Postgresql connections not being dropped between tests?
-----------------------------------+--------------------------------------
     Reporter:  Matthew Fisher     |                    Owner:  nobody
         Type:  Bug                |                   Status:  closed
    Component:  Testing framework  |                  Version:  3.0
     Severity:  Normal             |               Resolution:  needsinfo
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Hi Andrew.

 Do you have a proposal here? (I can't see any new information really...)

 Looking at the test project, I'm inclined to think the issue lies in the
 weird threading usage. (It's always the weird threading usage... 🙂)

 The original Caktus article notes that the test code used inside the
 `test_concurrently` decorator must be thread safe. I'm guessing it's not —
 but I don't have a specific diagnosis there.
 The article says that each thread must use it's own client instance, but
 the test code references `self.factory`... Maybe worth looking at? (In
 contrast to `RequestFactory`, `Client` actually processing the request,
 including calling `close_old_connections` — the example project's render
 call does not...)

 > This is my first time engaging with a Django project issue, what needs
 to happen to reopen this to continue investigation?

 Welcome aboard. Investigation can continue, but it probably needs you to
 dig down and establish exactly what's going on. (Can you inspect
 connections inside each thread, for example...)

 At this stage it's not clear that Django is at fault, or that the intended
 usage is supported or ... — as such it's `needsinfo`. That doesn't mean it
 can't be addressed if we can pin it down some more, just that it's not
 clear what, if anything, we can or should do. I hope that makes sense.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22420#comment:23>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.08e64190cb392c8c4ddc465b3e1d5b04%40djangoproject.com.

Reply via email to