Skip to content

Commit da00a71

Browse files
authored
CSHARP-4761: Enable serverless tests with failpoints (#1212)
1 parent 8e43404 commit da00a71

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

tests/MongoDB.Driver.Tests/Specifications/UnifiedTestSpecRunner.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ public void LoadBalancers(JsonDrivenTestCase testCase)
122122
Run(testCase);
123123
}
124124

125-
[Category("SupportLoadBalancing")]
125+
[Category("Serverless", "SupportLoadBalancing")]
126126
[UnifiedTestsTheory("retryable_reads.tests.unified")]
127127
public void RetryableReads(JsonDrivenTestCase testCase) => Run(testCase);
128128

129-
[Category("SupportLoadBalancing")]
129+
[Category("Serverless", "SupportLoadBalancing")]
130130
[UnifiedTestsTheory("retryable_writes.tests.unified")]
131131
public void RetryableWrites(JsonDrivenTestCase testCase) => Run(testCase);
132132

@@ -145,16 +145,7 @@ public void ServerDiscoveryAndMonitoring(JsonDrivenTestCase testCase) =>
145145

146146
[Category("Serverless", "SupportLoadBalancing")]
147147
[UnifiedTestsTheory("transactions.tests.unified")]
148-
public void Transactions(JsonDrivenTestCase testCase)
149-
{
150-
if (testCase.Name.Contains("find does not retry in a transaction"))
151-
{
152-
// CSHARP-4761
153-
RequireServer.Check().Serverless(false);
154-
}
155-
156-
Run(testCase);
157-
}
148+
public void Transactions(JsonDrivenTestCase testCase) => Run(testCase);
158149

159150
[UnifiedTestsTheory("unified_test_format.tests.valid_fail")]
160151
public void UnifiedTestFormatValidFail(JsonDrivenTestCase testCase)

tests/MongoDB.Driver.Tests/Specifications/retryable-reads/RetryableReadsTestRunner.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@
3232
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
3333
using MongoDB.Driver.TestHelpers;
3434
using MongoDB.Driver.Tests.JsonDrivenTests;
35+
using MongoDB.TestHelpers.XunitExtensions;
3536
using Xunit;
3637
using Xunit.Abstractions;
3738
using Xunit.Sdk;
3839

3940
namespace MongoDB.Driver.Tests.Specifications.retryable_reads
4041
{
41-
[Trait("Category", "SupportLoadBalancing")]
42+
[Category("Serverless", "SupportLoadBalancing")]
4243
public sealed class RetryableReadsTestRunner : LoggableTestClass
4344
{
4445
#region static

tests/MongoDB.Driver.Tests/Specifications/retryable-writes/RetryableWriteTestRunner.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
using MongoDB.Driver.Core.TestHelpers.Logging;
2525
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
2626
using MongoDB.Driver.TestHelpers;
27+
using MongoDB.TestHelpers.XunitExtensions;
2728
using Xunit;
2829
using Xunit.Abstractions;
2930
using Xunit.Sdk;
3031

3132
namespace MongoDB.Driver.Tests.Specifications.retryable_writes
3233
{
33-
[Trait("Category", "SupportLoadBalancing")]
34+
[Category("Serverless", "SupportLoadBalancing")]
3435
public class RetryableWriteTestRunner : LoggableTestClass
3536
{
3637
private readonly string _databaseName = DriverTestConfiguration.DatabaseNamespace.DatabaseName;

0 commit comments

Comments
 (0)