-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5392: Add integration tests for transactions write concern behavior #1733
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
base: main
Are you sure you want to change the base?
Conversation
namespace MongoDB.Driver.Tests.Specifications.transactions | ||
{ | ||
[Trait("Category", "Integration")] | ||
public class TransactionsProseTests |
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.
Let's make it inherit from LoggableTestClass, so we get logs on failure.
[Trait("Category", "Integration")] | ||
public class TransactionsProseTests | ||
{ | ||
private string _collectionName = "txn-test-col"; |
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.
constant?
// https://github.com/mongodb/specifications/blob/fc7996db26d0ea92091a5034c6acb287ef7282fe/source/transactions/tests/README.md#10-write-concern-not-inherited-from-collection-object-inside-transaction | ||
[Theory] | ||
[ParameterAttributeData] | ||
public async void Ensure_write_concern_is_not_inherited_from_collection_object_inside_transaction([Values(false, true)] bool async) |
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.
async Task
?
} | ||
} | ||
|
||
exception.Should().BeNull(); |
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.
There is no need to use Record in order to validate the absence of exception. The test will just fail on exception.
It's usually used to validate that exception was thrown.
No description provided.