jejacks0n / teaspoon

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

Tests not running in latest version of Puma #484

Closed alistairjcbrown closed 8 years ago

alistairjcbrown commented 8 years ago

Running tests with the following setup:

rails 4.1.15
teaspoon 1.1.4
teaspoon-jasmine 2.2.0

Puma version 2: Tests run successfully using the teaspoon rake task 2.16.0 being the latest version under the version 2 major release

$ teaspoon
Starting the Teaspoon server...
Puma 2.16.0 starting...
* Min threads: 0, max threads: 16
* Environment: test
* Listening on tcp://127.0.0.1:52097
Teaspoon running default suite at http://127.0.0.1:52097/teaspoon/default

# shortened

Finished in 2.06400 seconds
657 examples, 0 failures

Puma version 3: Process hangs using the teaspoon rake task 3.0.0 being the first version under the version 3 major release, the same happens on the latest version 3.4.0

$ teaspoon
Starting the Teaspoon server...
* Pruning Bundler environment
[48840] Puma starting in cluster mode...
[48840] * Version 3.0.0 (ruby 2.1.2-p95), codename: Plethora of Penguin Pinatas
[48840] * Min threads: 1, max threads: 4
[48840] * Environment: development
[48840] * Process workers: 2
[48840] * Phased restart available
[48840] * Listening on tcp://0.0.0.0:3000
[48840] Use Ctrl-C to stop
[48852] + Gemfile in context: /path/to/project/Gemfile
[48853] + Gemfile in context: /path/to/project/Gemfile
[48840] - Worker 1 (pid: 48853) booted, phase: 0
[48840] - Worker 0 (pid: 48852) booted, phase: 0

No puma configs have changed, though I notice that puma always connects to port 3000 in the puma 3 output whereas it uses a random port in puma 2. teaspoon --server-port=3000 has no effect.

johnjmaguire commented 8 years ago

Upon further investigation this was caused by starting Puma 3.x in Cluster Mode. Switching to Single Mode (by removing the workers config in Puma) allowed us to run the test suite as expected. Safe to close this up.