On 6/7/06, Lonny Eachus <[EMAIL PROTECTED]> wrote:
We had a server set up using multiple Mongrels with a lighttpd front end. A server will wait for an http request to come in, and fire off our Rails application. The program exits when done (i.e., the controller .rb runs to completion, no polling loop or anything), but of course the server does not shut down . . . it waits for more requests.

I thought you were giving advice to Watir users, and that was why i complained. I certainly see know how global variables could get you into the kind of trouble you were talking about using Mongrel and Rails. Your Mongrel server is running continuously and it stores your global variables. Of course. I can also see how this lead you to trouble, but i suggest that one of the Rails or Ruby forums is a better place for you to discuss the problem. I fear it will only lead to confusion mostly amongst people who can't really benefit from your experience (because most people here aren't using Rails). Your problem was really a development problem not a testing problem.

When people are using Watir for testing, they are running tests in a separate process and successive runs are in different processes, so globals won't raise these kinds of problems. There are other reasons to avoid globals, but these mostly pertaining to making code more maintainable. I will continue to suggest global variables to new users who are starting to use Watir.

Bret
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to