0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-28748 Set ulimit in package smoke testing

On SUSE 11 t1.micro AWS instances, the virtual memory ulimit is set low
enough to cause the mongo shell to fail to start because it cannot
allocate enough memory after SERVER-28400.
This commit is contained in:
Brian Samek 2017-04-12 14:08:11 -04:00
parent 7dc10fd9d8
commit b37733d3bc
2 changed files with 3 additions and 2 deletions

View File

@ -97,6 +97,7 @@ end
inspec_wait = <<HEREDOC
#!/bin/bash
ulimit -v unlimited
for i in {1..60}
do
mongo --eval "db.smoke.insert({answer: 42})"

View File

@ -145,13 +145,13 @@ end
# - verify that findOne() returns a matching document
############################################################
describe command('mongo --eval "db.smoke.insert({answer: 42})"') do
describe command('sh -c "ulimit -v unlimited && mongo --eval \"db.smoke.insert({answer: 42})\""') do
its('exit_status') { should eq 0 }
its('stdout') { should match(/.+WriteResult\({ "nInserted" : 1 }\).+/m) }
end
# read a document from the db
describe command('mongo --eval "db.smoke.findOne()"') do
describe command('sh -c "ulimit -v unlimited && mongo --eval \"db.smoke.findOne()\""') do
its('exit_status') { should eq 0 }
its('stdout') { should match(/.+"answer" : 42.+/m) }
end