Permalink
Browse files

Upgraded to mongo-java-driver 2.5.3

  • Loading branch information...
1 parent b21ad47 commit 0b4163bf7b91763060a8fdf515696c76143a9650 @eltimn eltimn committed Apr 22, 2011
@@ -28,20 +28,20 @@ object MongoSpec extends Specification("Mongo Specification") {
}
def passDefinitionTests(id: MongoIdentifier, ma: MongoAddress): Unit = {
- // define the db
- MongoDB.close
- MongoDB.defineDb(id, ma)
- // make sure it can be used
+ // make sure mongo is running
try {
MongoDB.use(id) { db =>
db.getLastError.ok must beEqualTo(true)
}
}
catch {
- case e: MongoInternalException if (e.getMessage == "DBPort.findOne failed") => skip("MongoDB is not running")
- case e: NullPointerException => skip("MongoDB is not running")
- case e: MongoException if (e.getMessage == "can't find a master") => skip("MongoDB is not running")
+ case e: Exception => skip("MongoDB is not running")
}
+
+ // define the db
+ MongoDB.close
+ MongoDB.defineDb(id, ma)
+
// using an undefined identifier throws an exception
MongoDB.use(DefaultMongoIdentifier) { db =>
db.getLastError.ok must beEqualTo(true)
@@ -55,7 +55,7 @@ class LiftFrameworkProject(info: ProjectInfo) extends ParentProject(info) with L
lazy val couchdb = persistenceProject("couchdb", dispatch_http)(record)
lazy val squeryl_record = persistenceProject("squeryl-record", RuntimeScope.h2database, squeryl)(record)
lazy val mongodb = persistenceProject("mongodb", mongo_driver)(json_ext)
- lazy val mongodb_record = persistenceProject("mongodb-record", dispatch_http)(record, mongodb)
+ lazy val mongodb_record = persistenceProject("mongodb-record")(record, mongodb)
// Framework apidocs

0 comments on commit 0b4163b

Please sign in to comment.