Massive unit test vs MySQL

Richard Wesley hawkfish at trustedmedianetworks.com
Fri Sep 5 11:17:14 EDT 2003


In article <bja8ls$k1j$1 at nntp0.reith.bbc.co.uk>,
 Neil Padgen <neil.padgen at mon.bbc.co.uk> wrote:

> On Thursday 04 September 2003 20:35, Richard Wesley wrote:
> 
> > I have a unit test suite for our server that loads a clean database
> > image for many of the tests.  I use
> > 
> > p = os.popen('mysql -u uid -ppassword mydatabase', 'w')
> > p.write(sql_commands)
> 
> Your pipe is still open at this point, and therefore you have a
> connection to the database open.
> 
> > So my question would be, is there any way to shut down the child
> > process so that MySQL notices and cleans up after itself before it
> > runs out of threads?
> 
> p.close()

Yeah, I tried this, but it had no effect.

The odd thing is that the process list cleans up _immediately_ when the 
script terminates.  Maybe this is some sort of gc problem?

-- 

- rmgw

<http://www.trustedmedianetworks.com/>

----------------------------------------------------------------------------
Richard Wesley                                  Trusted Media Networks, Inc.

"You're confusing boredom with motivation."
                  - Sherman in "Sherman's Lagoon"




More information about the Python-list mailing list