summaryrefslogtreecommitdiff
path: root/jstests/disk
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2015-03-19 16:34:06 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2015-03-19 16:40:28 -0400
commit2c6ab1eaae38caeee322f0c9afc4ef973fb667ea (patch)
tree16c7c805dddb2166ddf20fcb08858f886b76937f /jstests/disk
parentf97a60f882e265e58b4797004f0aa25eeb31d4dc (diff)
downloadmongo-2c6ab1eaae38caeee322f0c9afc4ef973fb667ea.tar.gz
SERVER-17652 Only run too_many_fds.js on 64-bit builds.
Diffstat (limited to 'jstests/disk')
-rw-r--r--jstests/disk/too_many_fds.js39
1 files changed, 23 insertions, 16 deletions
diff --git a/jstests/disk/too_many_fds.js b/jstests/disk/too_many_fds.js
index f714d495d7c..edb232c2f70 100644
--- a/jstests/disk/too_many_fds.js
+++ b/jstests/disk/too_many_fds.js
@@ -1,22 +1,29 @@
// Create more than 1024 files on certain storage engines, then restart the server and see that it
// can still listen on fd's smaller than FD_SETSIZE.
-(function() {
-var baseName = "jstests_disk_too_many_fds";
+function doTest() {
+ var baseName = "jstests_disk_too_many_fds";
-var m = MongoRunner.runMongod( { smallfiles: "" , nssize: 1 } );
-// Make 1026 collections, each in a separate database. On some storage engines, this may cause
-// 1026 files to be created.
-for (var i = 1; i < 1026; ++i) {
- var db = m.getDB("db" + i);
- var coll = db.getCollection("coll" + i);
- assert.writeOK(coll.insert( {} ));
-}
+ var m = MongoRunner.runMongod( { smallfiles: "" , nssize: 1 } );
+ // Make 1026 collections, each in a separate database. On some storage engines, this may cause
+ // 1026 files to be created.
+ for (var i = 1; i < 1026; ++i) {
+ var db = m.getDB("db" + i);
+ var coll = db.getCollection("coll" + i);
+ assert.writeOK(coll.insert( {} ));
+ }
+
+ MongoRunner.stopMongod( m );
-MongoRunner.stopMongod( m );
+ // Ensure we can still start up with that many files.
+ var m2 = MongoRunner.runMongod( { dbpath: m.dbpath, smallfiles: "" , nssize: 1,
+ restart: true, cleanData: false } );
+ assert.eq(1, m2.getDB("db1025").getCollection("coll1025").count());
+}
-// Ensure we can still start up with that many files.
-var m2 = MongoRunner.runMongod( { dbpath: m.dbpath, smallfiles: "" , nssize: 1,
- restart: true, cleanData: false } );
-assert.eq(1, m2.getDB("db1025").getCollection("coll1025").count());
-}());
+if (db.serverBuildInfo().bits == 64) {
+ doTest();
+}
+else {
+ print("Skipping. Only run this test on 64bit builds");
+}