Skip to content

Commit bdbea77

Browse files
committed
Revert "Only add setParameter in mongo config if we are on a server that supports it"
This reverts commit 8d6fd02.
1 parent 32b8310 commit bdbea77

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

test/replica_set/insert_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class ReplicaSetInsertTest < Test::Unit::TestCase
1818

1919
def setup
20-
ensure_cluster(:rs, :server_version => MongoClient.new.server_version.to_s)
20+
ensure_cluster(:rs)
2121
@client = MongoReplicaSetClient.from_uri(@uri)
2222
@version = @client.server_version
2323
@db = @client.db(TEST_DB)

test/tools/mongo_config.rb

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,17 @@ def self.make_mongod(kind, opts)
121121
fast_sync = opts[:fastsync] || false
122122
auth = opts[:auth] || true
123123
ipv6 = opts[:ipv6].nil? ? true : opts[:ipv6]
124-
125-
with_additional_options = params.merge(:command => mongod,
126-
:dbpath => path,
127-
:smallfiles => smallfiles,
128-
:noprealloc => noprealloc,
129-
:quiet => quiet,
130-
:fastsync => fast_sync,
131-
:auth => auth,
132-
:ipv6 => ipv6)
133-
if opts[:server_version] > '2.2'
134-
with_additional_options.merge(:setParameter => opts[:setParameter] || 'enableTestCommands=1')
135-
else
136-
with_additional_options
137-
end
124+
setParameter = opts[:setParameter] || 'enableTestCommands=1'
125+
126+
params.merge(:command => mongod,
127+
:dbpath => path,
128+
:smallfiles => smallfiles,
129+
:noprealloc => noprealloc,
130+
:quiet => quiet,
131+
:fastsync => fast_sync,
132+
:auth => auth,
133+
:ipv6 => ipv6,
134+
:setParameter => setParameter)
138135
end
139136

140137
def self.key_file(opts)

0 commit comments

Comments
 (0)