Casbah r3.1.0 test fails

Skip to first unread message

Dec 17, 2015, 11:26:19 PM12/17/15
to mongodb-casbah-users

I'm trying out the latest release of the Casbah driver r3.1.0 from, however, I'm getting exceptions while running the tests. e.g.

I've attached the complete output of executing "./sbt test". Below are details about the test execution environment.

OS/Arch: rhelppc64le
Java:      openjdk version "1.8.0_65"
               OpenJDK Runtime Environment (build 1.8.0_65-b17)
               OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)

mongod version: 3.2.0

Scala version: Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL

sbt version: 0.13.8

Commands used:

To start mongodb server: mongod --setParameter enableTestCommands=1

To compile casbah: ./sbt compile

To test casbah: ./sbt test


Kindly guide me on this issue.




Ross Lawley

Dec 18, 2015, 4:57:17 AM12/18/15
Hi Valnci,

Thanks for posting on this. Unfortunately, I can't replicate the issue that you are seeing but rest assured it is a minor issue that you can ignore.  

The issue is with the "casbah-commons/test:test" and the test failing is:[Double]("x") must throwA[ClassCastException](message = "java.lang.Integer cannot be cast to java.lang.Double")
Which tests for an explicit error message:"java.lang.Integer cannot be cast to java.lang.Double"
Your exception is slightly different: "java.lang.Integer incompatible with java.lang.Double"

I don't have openJDK on the Mac and although the Casbah test suite is run across multiple versions of Scala its not explicitly tested on different JVM implementations.  I think theres a small difference in JVM implementations giving a different error messages in this scenario and I've removed the message check for that test in the master branch.

Kind Regards,


You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to

For more options, visit


{ name     : "Ross Lawley",
  title    : "Senior Software Engineer",
  location : "London, UK",
  twitter  : ["@RossC0", "@MongoDB"],
  facebook :"MongoDB"}

Dec 18, 2015, 9:08:23 AM12/18/15
to mongodb-casbah-users
Hi Ross,

Thanks for the insight. I understand the scenario now. I'll checkout the master branch too.

Reply all
Reply to author
0 new messages