eigengo / akka-patterns

Demonstration of the common Akka patterns
Apache License 2.0
560 stars 61 forks source link

Built project in sbt, made tons of dependency changes, and have an issue with the tests #9

Closed switzer closed 11 years ago

switzer commented 11 years ago

Hi -

I am having issues running the tests. I am getting the following stack trace:

https://gist.github.com/4208541

It seems like there is an issue with Mongo configuration? Any help pointing me in the right direction would be much appreciated.

Thanks! Scott

switzer commented 11 years ago

It looks like main.scala does not create a Mongo Connection. I added this, but still am not able to get past this error. Any help appreciated.

switzer commented 11 years ago

I also added creating a Mongo Connection to the test DB in SpecConfiguration.scala, and this did the trick:

trait SpecConfiguration extends Configuration {
  configure {
    val mongoDb = MongoConnection()("akka-patterns-test")
    val json = Source.fromInputStream(classOf[SpecConfiguration].getResourceAsStream("/com/cakesolutions/akkapatterns/mongodb-base.js")).mkString
    mongoDb.eval(json)

    mongoDb
  }
}