summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorBrian Samek <brian.samek@mongodb.com>2017-04-12 14:08:11 -0400
committerBrian Samek <brian.samek@mongodb.com>2017-04-13 16:24:22 -0400
commitfec7003d10f5837b9d419fdab4dca5aaa66c4e61 (patch)
treea790ca22620db4422ddba917f61949be63f23043 /buildscripts
parentee97c517c62a6856265a636400cb6953f648ac4e (diff)
downloadmongo-fec7003d10f5837b9d419fdab4dca5aaa66c4e61.tar.gz
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. (cherry picked from commit b37733d3bc96cb0cb863358218944b1d97730a1e)
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/package_test/recipes/install_mongodb.rb1
-rw-r--r--buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/buildscripts/package_test/recipes/install_mongodb.rb b/buildscripts/package_test/recipes/install_mongodb.rb
index cc26434e65c..dcf7499289e 100644
--- a/buildscripts/package_test/recipes/install_mongodb.rb
+++ b/buildscripts/package_test/recipes/install_mongodb.rb
@@ -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})"
diff --git a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
index e974e4bd54c..c8fc8e270e1 100644
--- a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
+++ b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
@@ -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