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
- we insert document
- we read it right away
- sometime client reads it from a replica that doesn't have this document yet
- test case asserts that exception will be thrown because malformed ciphertext
- 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