Skip to content

Commit 490be9c

Browse files
authored
CSHARP-5939: Remove duplicated test cases (#1922)
1 parent f548028 commit 490be9c

14 files changed

Lines changed: 4 additions & 27 deletions

tests/MongoDB.Driver.Tests/ClientSessionHandleTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,6 @@ public void WithTransaction_callback_with_a_UnknownTransactionCommitResult_shoul
487487
[InlineData(new[] { false, false }, new[] { WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.NoError }, false /*Should exception be thrown*/, 1, false)]
488488
[InlineData(new[] { false, true }, new[] { WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.UnknownTransactionCommitResult }, true /*Should exception be thrown*/, 1, false)]
489489

490-
[InlineData(new[] { false, false }, new[] { WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.NoError }, false /*Should exception be thrown*/, 1, false)]
491-
492490
// async
493491
[InlineData(null, new[] { WithTransactionErrorState.NoError }, false /*Should exception be thrown*/, 1, true)]
494492
[InlineData(null, new[] { WithTransactionErrorState.TransientTransactionError, WithTransactionErrorState.NoError }, false /*Should exception be thrown*/, 2, true)]
@@ -500,8 +498,6 @@ public void WithTransaction_callback_with_a_UnknownTransactionCommitResult_shoul
500498

501499
[InlineData(new[] { false, false }, new[] { WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.NoError }, false /*Should exception be thrown*/, 1, true)]
502500
[InlineData(new[] { false, true }, new[] { WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.UnknownTransactionCommitResult }, true /*Should exception be thrown*/, 1, true)]
503-
504-
[InlineData(new[] { false, false }, new[] { WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.UnknownTransactionCommitResult, WithTransactionErrorState.NoError }, false /*Should exception be thrown*/, 1, true)]
505501
public void WithTransaction_commit_after_callback_processing_should_be_processed_with_expected_result(
506502
bool[] isRetryAttemptsWithTimeout, // the array length should be the same with a number of failed attempts from `commitTransactionErrorStates`
507503
WithTransactionErrorState[] commitTransactionErrorStates,

tests/MongoDB.Driver.Tests/Core/Clusters/ClusterFactoryTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public void ClusterFactory_should_create_cluster_when_loggerfactory_is_not_set()
4747

4848
[Theory]
4949
[InlineData("mongodb://a.MONGO.COSMOS.AZURE.COM:19555", ExpectedCosmosDBMessage)]
50-
[InlineData("mongodb://a.MONGO.COSMOS.AZURE.COM:19555", ExpectedCosmosDBMessage)]
5150
[InlineData("mongodb://a.mongo.cosmos.azure.com:19555", ExpectedCosmosDBMessage)]
5251
[InlineData("mongodb://a.DOCDB-ELASTIC.AMAZONAWS.COM:27017/", ExpectedDocumentDBMessage)]
5352
[InlineData("mongodb://a.docdb-elastic.amazonaws.com:27017/", ExpectedDocumentDBMessage)]

tests/MongoDB.Driver.Tests/Core/Clusters/MultiServerClusterTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -776,14 +776,6 @@ public void Should_not_add_a_new_server_from_a_secondary_when_a_primary_exists()
776776
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetPrimary)]
777777
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetSecondary)]
778778
[InlineData(ServerType.ShardRouter, ServerType.Standalone)]
779-
[InlineData(ServerType.ReplicaSetPrimary, ServerType.ShardRouter)]
780-
[InlineData(ServerType.ReplicaSetPrimary, ServerType.Standalone)]
781-
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetArbiter)]
782-
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetGhost)]
783-
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetOther)]
784-
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetPrimary)]
785-
[InlineData(ServerType.ShardRouter, ServerType.ReplicaSetSecondary)]
786-
[InlineData(ServerType.ShardRouter, ServerType.Standalone)]
787779
public void Should_hide_a_seedlist_server_of_the_wrong_type(ServerType initialType, ServerType wrongType)
788780
{
789781
_settings = _settings.With(

tests/MongoDB.Driver.Tests/Core/Clusters/SingleServerClusterTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public void Initialize_should_create_and_initialize_the_server()
9898
[InlineData(ServerType.ReplicaSetOther)]
9999
[InlineData(ServerType.ReplicaSetPrimary)]
100100
[InlineData(ServerType.ReplicaSetSecondary)]
101-
[InlineData(ServerType.ShardRouter)]
102101
public void Description_should_contain_any_new_server(ServerType serverType)
103102
{
104103
var subject = CreateSubject();

tests/MongoDB.Driver.Tests/Core/Connections/BinaryConnection_CommandEventTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public static IEnumerable<object[]> GetPotentiallyRedactedCommandTestCases()
6262
new object[] { "{ updateUser : 1 }", true },
6363
new object[] { "{ copydbsaslstart : 1 }", true },
6464
new object[] { "{ copydb : 1 }", true },
65-
new object[] { "{ authenticate : 1 }", true },
6665
new object[] { "{ hello : 1, helloOk : true }", false },
6766
new object[] { "{ hello : 1, helloOk : true, speculativeAuthenticate : { } }", true },
6867
new object[] { $"{{ {OppressiveLanguageConstants.LegacyHelloCommandName} : 1, helloOk : true }}", false },

tests/MongoDB.Driver.Tests/Core/Connections/HelloResultTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ public void SaslSupportedMechs_should_parse_document_correctly(string json, stri
250250
[InlineData("{ ok: 1, isreplicaset: false }", ServerType.Standalone)]
251251
[InlineData("{ ok: 1, isreplicaset: 0 }", ServerType.Standalone)]
252252
[InlineData("{ ok: 1, msg: \"isdbgrid\" }", ServerType.ShardRouter)]
253-
[InlineData("{ ok: 1, msg: \"isdbgrid\" }", ServerType.ShardRouter)]
254253
[InlineData("{ ok: 1, serviceId: ObjectId('111111111111111111111111') }", ServerType.LoadBalanced)]
255254
[InlineData("{ ok: 1 }", ServerType.Standalone)]
256255
[InlineData("{ ok: 0 }", ServerType.Unknown)]

tests/MongoDB.Driver.Tests/Core/Misc/RangeTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public void Constructor_should_throw_when_min_is_greater_than_max()
3737
[Theory]
3838
[InlineData(0, 0, 0, 0, true)]
3939
[InlineData(0, 1, 0, 1, true)]
40-
[InlineData(0, 0, 0, 0, true)]
4140
[InlineData(0, 1, 0, 0, false)]
4241
[InlineData(0, 0, 0, 1, false)]
4342
public void Equals_should_return_correct_value(int a1, int a2, int b1, int b2, bool expected)
@@ -51,7 +50,6 @@ public void Equals_should_return_correct_value(int a1, int a2, int b1, int b2, b
5150
[Theory]
5251
[InlineData(0, 0, 0, 0, true)]
5352
[InlineData(0, 1, 0, 0, true)]
54-
[InlineData(0, 1, 0, 0, true)]
5553
[InlineData(0, 1, 1, 1, true)]
5654
[InlineData(0, 0, 0, 1, true)]
5755
[InlineData(1, 1, 0, 1, true)]

tests/MongoDB.Driver.Tests/Core/MongoCommandExceptionTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public void constructor_with_message_command_result_should_initialize_subject()
7979
[Theory]
8080
[InlineData(null, new string[0])]
8181
[InlineData("{ }", new string[0])]
82-
[InlineData("{ }", new string[0])]
8382
[InlineData("{ errorLabels : \"not an array\" }", new string[0])]
8483
[InlineData("{ errorLabels : [ ] }", new string[0])]
8584
[InlineData("{ errorLabels : [ 1 ] }", new string[0])]

tests/MongoDB.Driver.Tests/Core/Operations/RetryableWriteOperationExecutorTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public void AreRetryableWritesSupportedTest()
5656
[InlineData(true, true, false, false, false)]
5757
[InlineData(true, true, false, true, false)]
5858
[InlineData(true, true, true, false, true)]
59-
[InlineData(true, true, true, false, true)]
6059
public void DoesContextAllowRetries_should_return_expected_result(
6160
bool retryRequested,
6261
bool areRetryableWritesSupported,

tests/MongoDB.Driver.Tests/MongoCredentialTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
namespace MongoDB.Driver.Tests
2222
{
23-
[Trait("Category", "Integration")]
2423
public class MongoCredentialTests
2524
{
2625
[Fact]

0 commit comments

Comments
 (0)