jejacks0n / teaspoon

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

Teaspoon does not work with Puma 3.7.0 as a server #512

Open rhymes opened 7 years ago

rhymes commented 7 years ago

Hello,

I've noticed that teaspoon stopped working with Puma 3.7.0

➜ SERVER_TIMEOUT=60 bundle exec teaspoon Starting the Teaspoon server... [22313] Puma starting in cluster mode... [22313] Version 3.7.0 (ruby 2.3.3-p222), codename: Snowy Sagebrush [22313] Min threads: 1, max threads: 1 [22313] Environment: development [22313] Process workers: 2 [22313] Preloading application [22313] Listening on tcp://0.0.0.0:3000 [22313] Use Ctrl-C to stop [22313] - Worker 0 (pid: 22317) booted, phase: 0 [22313] - Worker 1 (pid: 22319) booted, phase: 0 Unable to start teaspoon server; consider increasing the timeout with config.server_timeout. [22319] ! Detected parent died, dying[22317] ! Detected parent died, dying

All is well with the previous release of Puma, 3.6.2

➜ closer git:(puma37) SERVER_TIMEOUT=60 bundle exec teaspoon Starting the Teaspoon server... [22409] Puma starting in cluster mode... [22409] Version 3.6.2 (ruby 2.3.3-p222), codename: Sleepy Sunday Serenity [22409] Min threads: 1, max threads: 1 [22409] Environment: test [22409] Process workers: 2 [22409] Preloading application [22409] Listening on tcp://127.0.0.1:55068 [22409] Use Ctrl-C to stop [22409] - Worker 0 (pid: 22415) booted, phase: 0 [22409] - Worker 1 (pid: 22416) booted, phase: 0 Teaspoon running default suite at http://127.0.0.1:55068/teaspoon/default ......

Finished in 0.03000 seconds 6 examples, 0 failures

=============================== Coverage summary =============================== Statements : 100% ( 21/21 ) Branches : 100% ( 10/10 ) Functions : 100% ( 5/5 ) Lines : 100% ( 21/21 )

[22416] ! Detected parent died, dying [22415] ! Detected parent died, dying

I'm not sure what's going on, here's Puma's 3.7.0 release changelog: https://github.com/puma/puma/blob/master/History.md#370--2017-01-04

jejacks0n commented 7 years ago

potentially related? https://github.com/puma/puma/issues/1154

jwhitmire commented 7 years ago

I hit this issue as well and I think it is related to the port issue @jejacks0n referenced. If I explicitly set config.server_port in my config file, then it worked for me.

twalpole commented 7 years ago

The issue is that puma attempts to load a configuration file if ones exists and gives any settings in that file priority over whatever settings are passed into the method used to start puma. The configuration files tried are config/puma/<environment>.rb and if that doesn't exist it will try for config/puma.rb . You should be able to workaround around this issue by either telling puma not to load any config files (by somehow passing in the config_files: ['-'] option), or set the settings you want teaspoon to use in config/puma/test.rb

mathieujobin commented 3 years ago

would be nice to have a fix for this, since ruby3 no longer ships with webrick. so moving the CI build to use puma instead would be much appreciate any volunteer?