Browse Source

remove ringojs' mongodb test

the test fails and i don't think anyone is using this in production
Simon Oberhammer 12 years ago
parent
commit
8eed45a2ba
3 changed files with 0 additions and 24 deletions
  1. 0 7
      ringojs/benchmark_config
  2. 0 16
      ringojs/ringo-main.js
  3. 0 1
      ringojs/setup.py

+ 0 - 7
ringojs/benchmark_config

@@ -14,13 +14,6 @@
       "fortune_url": "/fortune",
       "port": 8080,
       "sort": 74
-    },
-    "mongodb": {
-      "setup_file": "setup",
-      "db_url": "/mongodb",
-      "query_url": "/mongodb?queries=",
-      "port": 8080,
-      "sort": 116
     }
   }]
 }

+ 0 - 16
ringojs/ringo-main.js

@@ -1,6 +1,5 @@
 var sql = require('sql-ringojs-client');
 var mustache = require('ringo/mustache');
-var mongodb = require('ringo-mongodb');
 
 // DO NOT TOUCH THE FOLLOWING LINE.
 // THIS VARIABLE IS REGEX REPLACED BY setup.py
@@ -80,21 +79,6 @@ exports.app = function(req) {
             connection.close();
          }
       }
-   } else if (path === '/mongodb') {
-      var queryCount = req.env.servletRequest.getParameter('queries') | 1;
-      var col = mongodb.connect(mongodbUri).getCollection('world');
-      var body = [];
-      var randId, world;
-      for (var i = 0; i < queryCount; i++) {
-         randId = ((Math.random() * 10000) | 0) + 1;
-         world = col.findOne({id: randId});
-         body.push(world ? world.data : "Record not found for id#" + randId);
-      }
-      return {
-         status: 200,
-         headers: {"Content-Type": "application/json; charset=UTF-8"},
-         body: [mongodb.JSON.to(body)]
-      };
    }
 };
 

+ 0 - 1
ringojs/setup.py

@@ -6,7 +6,6 @@ import os
 
 def start(args):
   setup_util.replace_text("ringojs/ringo-main.js", "dbHost = '.*';", "dbHost = '" + args.database_host + "';")
-  setup_util.replace_text("ringojs/ringo-main.js", "mongodb:\/\/.*\/hello_world", "mongodb://" + args.database_host + "/hello_world")
 
   try:
     subprocess.check_call("sudo rm -rf /usr/share/ringojs/packages/*", shell=True)