Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Make max slaves number in magzine mode configurable #189

wants to merge 1 commit into from

5 participants


I am using spork for unit testing in a JRuby Rails project. I found the default 2 slaves in magazine mode is not big enough for a fast TDD rhythm. I frequently found I used up two of slave node and get a "- NO tuple" error. So I put in a environment variable called MAX_SLAVES to configure it(default is still 2). MAX_SLAVES=6 works perfectly for me.


I just started to do something similar, but i'd rename variable name to be more specific to spork, e.g. SPORK_MAX_SLAVES


Any progress on this? I have an issue where I have my rspec prefork block load some singleton factories to prepopulate my test database with some data that a large number of my tests use. However, when two slaves both try to load it they step on each other and nothing works. So I want to have only one slave run. It doesn't look like there's any way to do this --

This pull request has been out there are year -- is anyone even maintaining spork anymore? The last update was 6 months ago.


Closing old pull requests. Please send new ones if this is still an issue.

@sahilm sahilm closed this

@sahilm this would indeed be a nice addition, as @wpc says 2 slaves may not be enough for some people's testing pace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 21, 2012
  1. @wpc

    make max slaves number in magzine mode configurable through MAX_SLAVE…

    wpc authored
    …S environment variable
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/spork/run_strategy/magazine.rb
2  lib/spork/run_strategy/magazine.rb
@@ -19,7 +19,7 @@
class Spork::RunStrategy::Magazine < Spork::RunStrategy
- Slave_Id_Range = 1..2 # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
+ Slave_Id_Range = 1..(ENV['MAX_SLAVES'] || 2).to_i # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
def slave_max
Something went wrong with that request. Please try again.