On Jul 31, 2007, at 4:33 AM, Ivan Fomichev wrote:

Hello,

I intend to write a script, that would start the test server as a
child process and then run tests. The thing I'm failing to do is to
get output from the test server in order to determine, when the server
has started.

The problem is that test server doesn't print its prompt ("You can
connect to your server at http://localhost:3000";) when run as a child
process :-(

I dug Catalyst's sources, but didn't understood much. I put 'sleep' in
parent process for now, but I don't like it. Could anyone suggest an
adequate work-around? Thank you in advance.

Take a look at the core test file t/optional_http-server.t. It does exactly what you are looking to do: launch the HTTP server, wait for it to start, run some tests, and shut it down again. But note that you don't actually need to run the HTTP server in order to test your code.

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to