-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-3427: Fix test. #541
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
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.
I'd recommend to change the name of the commit to be more specific.
My take is "Relax assertion of native library loader test"
664a42c
to
1a7e502
Compare
done |
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 think these two cases are better to be split
|
||
// the default assembly-based logic. Ideally expectedRootTestFolder should be mongo-csharp-driver, | ||
// but since it's not mocked logic, it limits us where we can run our tests from. Avoid it by | ||
// making a test assertation less strict | ||
[InlineData(null, "")] |
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.
Consider using the suggested refactoring: MikalaiMazurenka@bd94d56
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.
the validation and asserting steps here are the same, the only difference is input data, the ideal solution here is ClassData
but it looks like overkill for this case, a simple if
solves everything we need to. So I would leave this as is
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.
Alright, then could you remove the extra blank line and consider changing the 3 line comment to
// the default assembly-based logic. Ideally expectedRootTestFolder should be mongo-csharp-driver, | |
// but since it's not mocked logic, it limits us where we can run our tests from. Avoid it by | |
// making a test assertation less strict | |
[InlineData(null, "")] | |
[InlineData(null, "")] // This case validates only the ending of the path with GetBaseAssemblyUri being used |
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 wanted to explain why this change is necessary since it's kind of not obvious exception, you comment doesn't provide this info, however I don't mind about changing messages, it will be good to hear @JamesKovacs opinion here also
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
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
CSHARP-3427: Relax assertion of native library loader test.
Evergreen: https://evergreen.mongodb.com/version/60b6a2611e2d173aca1bb5ae