New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSHARP-4969: Fix failing CSFLE mocked kms tls tests #1268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technique seems reasonable, but we still have some variability to account for in the returned exception messages.
async | ||
? "Unable to read data from the transport connection: Connection reset by peer." | ||
: "Unable to write data to the transport connection: Connection reset by peer."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach seems reasonable and passes on Linux for netstandard2.0
, but is failing on netstandard2.1
due to differing error messages. The failing test is:
MongoDB.Driver.Tests.Specifications.client_side_encryption.prose_tests.ClientEncryptionProseTests.MongoDB.Driver.Tests.Specifications.client_side_encryption.prose_tests.ClientEncryptionProseTests.KmsTlsOptionsTest_kmsProvider___azure___certificateType__TlsWithoutClientCert__async__True_
The error on netstandard2.1
(Linux) is:
[2024/02/15 10:03:09.316] FAILURE: Expected string "The decryption operation failed, see inner exception." to contain "Unable to read data from the transport connection: Connection reset by peer.". (failure)
[2024/02/15 10:03:09.316] Expected string "The decryption operation failed, see inner exception." to contain "Unable to read data from the transport connection: Connection reset by peer.".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the test again a couple more times to see if the differing error here was just a legit error I missed but from my testing, I haven't been able to reproduce that error again. So it seems it have just been a random case. I researched the error a bit and it seems that the inner exception would have most likely been "Unable to read data from the transport connection: Connection reset by peer."
and it just got wrapped inside the The decryption operation failed
exception in this particular run of the test.
As of now my take is that this was just a random failure, and we can just go ahead with just the two error messages I am currently capturing and if that other error keeps popping enough then we can investigate further and add it to the expected exception messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for investigating. I restarted the failed variants on the patch build. Let's see if they go green this time. (It'll be an exercise for our future selves to make these tests less flaky.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.