encryptionClient uses writeConcern majority by strogiyotec · Pull Request #1858 · mongodb/mongo-java-driver

even though the specification test doesn't specify the write concern as being mandatory I observed that test fails sometime because

  1. we insert document
  2. we read it right away
  3. sometime client reads it from a replica that doesn't have this document yet
  4. test case asserts that exception will be thrown because malformed ciphertext
  5. but because replica return null the error is never thrown

The idea for write concern was borrowed from nodejs driver

I also created a thread in dbx team to update encryptionClient instructions in specification test

JAVA-6040