Skip to content

Commit c69bd39

Browse files
committed
test: Resolve stylecop lint errors
1 parent 353265e commit c69bd39

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

tests/Valkey.Glide.IntegrationTests/ConnectionMultiplexerReadFromMappingTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ public void ClientConfigurationBuilder_NullReadFrom_FlowsToConnectionConfig()
387387

388388
[Theory]
389389
[InlineData(ReadFromStrategy.Primary, null)]
390+
[InlineData(ReadFromStrategy.PrimaryAndSecondary, null)]
390391
[InlineData(ReadFromStrategy.PreferReplica, null)]
391392
[InlineData(ReadFromStrategy.AzAffinity, "us-east-1a")]
392393
[InlineData(ReadFromStrategy.AzAffinityReplicasAndPrimary, "eu-west-1b")]
@@ -401,6 +402,9 @@ public async Task EndToEnd_ReadFromConfiguration_FlowsFromConnectionStringToConn
401402
case ReadFromStrategy.Primary:
402403
connectionString += ",readFrom=Primary";
403404
break;
405+
case ReadFromStrategy.PrimaryAndSecondary:
406+
connectionString += ",readFrom=PrimaryAndSecondary";
407+
break;
404408
case ReadFromStrategy.PreferReplica:
405409
connectionString += ",readFrom=PreferReplica";
406410
break;
@@ -410,6 +414,8 @@ public async Task EndToEnd_ReadFromConfiguration_FlowsFromConnectionStringToConn
410414
case ReadFromStrategy.AzAffinityReplicasAndPrimary:
411415
connectionString += $",readFrom=AzAffinityReplicasAndPrimary,az={az}";
412416
break;
417+
default:
418+
throw new ArgumentException("Invalid ReadFromStrategy for this test");
413419
}
414420

415421
// Act

tests/Valkey.Glide.IntegrationTests/ReadFromEndToEndIntegrationTests.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,11 @@ public async Task EndToEnd_PerformanceValidation_MultipleConnectionsWithDifferen
607607

608608
var configurations = new[]
609609
{
610-
("Primary", ReadFromStrategy.Primary, (string?)null),
611-
("PreferReplica", ReadFromStrategy.PreferReplica, (string?)null),
610+
("Primary", ReadFromStrategy.Primary, null),
611+
("PreferReplica", ReadFromStrategy.PreferReplica, null),
612612
("AzAffinity", ReadFromStrategy.AzAffinity, "us-east-1a"),
613-
("AzAffinityReplicasAndPrimary", ReadFromStrategy.AzAffinityReplicasAndPrimary, "eu-west-1b")
613+
("AzAffinityReplicasAndPrimary", ReadFromStrategy.AzAffinityReplicasAndPrimary, "eu-west-1b"),
614+
("PrimaryAndSecondary", ReadFromStrategy.PrimaryAndSecondary, null)
614615
};
615616

616617
try
@@ -770,13 +771,15 @@ public async Task EndToEnd_FFILayerIntegration_ReadFromConfigurationReachesRustC
770771
// Test that ReadFrom configuration actually reaches the Rust core (FFI layer)
771772
// by creating clients with different ReadFrom strategies and verifying they work
772773

774+
#pragma warning disable CS8619
773775
var testCases = new[]
774776
{
775777
new { Strategy = ReadFromStrategy.Primary, Az = (string?)null },
776778
new { Strategy = ReadFromStrategy.PreferReplica, Az = (string?)null },
777779
new { Strategy = ReadFromStrategy.AzAffinity, Az = "us-east-1a" },
778780
new { Strategy = ReadFromStrategy.AzAffinityReplicasAndPrimary, Az = "eu-west-1b" }
779781
};
782+
#pragma warning restore CS8619
780783

781784
foreach (var testCase in testCases)
782785
{
@@ -907,8 +910,8 @@ public async Task EndToEnd_FFILayerIntegration_ConcurrentConnectionsWithDifferen
907910

908911
var configurations = new[]
909912
{
910-
(ReadFromStrategy.Primary, (string?)null),
911-
(ReadFromStrategy.PreferReplica, (string?)null),
913+
(ReadFromStrategy.Primary, null),
914+
(ReadFromStrategy.PreferReplica, null),
912915
(ReadFromStrategy.AzAffinity, "us-east-1a"),
913916
(ReadFromStrategy.AzAffinityReplicasAndPrimary, "eu-west-1b")
914917
};

0 commit comments

Comments
 (0)