jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Removes thread check as the thread may be dead #172

Closed chrisnicola closed 10 years ago

chrisnicola commented 10 years ago

Depending on the rack_options passed into Rack::Server the thread may not stay running and can simply exit immediately. If that happens then this will always return false. I doesn't seem to be necessary to check the thread status before checking if the server is running via TCP so I've removed this check.

jejacks0n commented 10 years ago

wouldn't it be bad if the thread was dead?

chrisnicola commented 10 years ago

Not if the server was spawned as a process which I believe is what is happening when Guard is running. Either way it checks if the server is running. It either is or it isn't.

When I debug through what's happening using guard-teaspoon Rack::Server#start just returns true and so the thread completes and exits, however the server is still running.

jejacks0n commented 10 years ago

Fair enough.. thanks for helping to clarify.