…with immutable doc types Caller must replace the doc with the returned one.
and normal test which caused test failures. Fixed.
…va driver would Java driver CommandResult.java throwOnError throws if !ok or if the "err" field exists. Previously this code would throw if the "errmsg" field exists. Even after looking at the mongo server's C++ for a bit I can't figure out exactly what "err" vs. "errmsg" is, but ... One case where CompletableWriteRequest didn't throw, before this patch, was a duplicate key on insert. This patch fixes that to complete the future with an exception.
The problem is that if you getAs[String] and it's None, then None is not a String. The None approach would only work if all other values were stored as Some(value) instead of just value. getAs already generates a None if the field is missing, so there's no need to actually store a None in the map, it works properly if we just omit the field entirely. Or another way to put it, we don't want getAs[String]("err") to potentially return Some(None), which it did in MongoConnectionHandler.
The issue asInstanceOf[A] calls didn't have any effect at runtime, so getAs[String] would actually return any type at all without throwing an exception. Use manifest[A].erasure.cast instead to force a runtime exception if the type is incorrect.
…essage Otherwise delete and update hit the "unknown" case.
type class flow from the read side has been painful mentally and compile wise
several people. Will build up shared examples etc instead.
ThrownExpectations exposed this brokenness.
more discreet multi matching for concurrency testing. Mixed in ThrownExpectations trait to change this.
Db/Coll level interfaces