Closed wichert closed 4 years ago
FWIW I can't reproduce the test failure locally. Is that a heisenbug?
I have the same problem on my latest PR. I think it's a concurrency issue, and I'll try to fix the tests. I'll message you here once I get it fixed.
@mremond @remicorniere Can this be merged?
Yes !
@wichert Regarding the test bug, I finally got it working. Basically Decoder "objects" were not used appropriately in the tests and mock server. Sometimes we would have two decoders open on a single TCP connection. When that happened, and since Decoder has internal buffering and silently discards invalid documents, we would lose part of messages between decoders and just discard the other parts in other decoders. This would lead some tests to fail. It is fixed now with #135
That sounds like it was painful to debug!
This fixes #133