On Mon, Oct 21, 2013 at 03:08:56PM -0700, Russell E. Owen wrote:
> For unit testing and other reasons I would like to launch a server in a 
> subprocess, then wait until it is available before running some code 
> that uses it. Is there a standard paradigm for this, e.g. poll until a 
> connection is accepted, or have the server emit some kind of "ready" 
> signal (such as a message to stdout or a UDP packet)? Any advice would 
> be appreciated. A web search didn't turn up anything.
 
Emitting a message on stdout has worked well for me before.

You can wait for this in your ProcessProtocol then continue
the test case once you receieve it.

        -E

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to