Skip to content

Commit b57542d

Browse files
committed
Fixed test
1 parent a1bb6d3 commit b57542d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/MongoDB.Driver.Tests/ClusterKeyTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using MongoDB.Bson;
2222
using MongoDB.Driver.Core.Compression;
2323
using MongoDB.Driver.Core.Configuration;
24+
using MongoDB.Driver.Core.Connections;
2425
using MongoDB.Driver.Core.Servers;
2526
using MongoDB.TestHelpers.XunitExtensions;
2627
using Xunit;
@@ -74,6 +75,7 @@ public void Equals_should_return_true_if_all_fields_are_equal()
7475
[InlineData("ServerMonitoringMode", true)]
7576
[InlineData("ServerSelectionTimeout", true)]
7677
[InlineData("SocketTimeout", true)]
78+
[InlineData("Socks5ProxySettings", true)]
7779
[InlineData("SrvMaxHosts", true)]
7880
[InlineData("SslSettings", true)]
7981
[InlineData("UseTls", true)]
@@ -180,6 +182,7 @@ private ClusterKey CreateSubject(string notEqualFieldName = null)
180182
var serverMonitoringMode = ServerMonitoringMode.Stream;
181183
var serverSelectionTimeout = TimeSpan.FromSeconds(6);
182184
var socketTimeout = TimeSpan.FromSeconds(4);
185+
var socks5ProxySettings = Socks5ProxySettings.Create("localhost", 1080, "user", "password");
183186
var srvMaxHosts = 0;
184187
var srvServiceName = "mongodb";
185188
var sslSettings = new SslSettings
@@ -228,6 +231,7 @@ private ClusterKey CreateSubject(string notEqualFieldName = null)
228231
case "ServerMonitoringMode": serverMonitoringMode = ServerMonitoringMode.Poll; break;
229232
case "ServerSelectionTimeout": serverSelectionTimeout = TimeSpan.FromSeconds(98); break;
230233
case "SocketTimeout": socketTimeout = TimeSpan.FromSeconds(99); break;
234+
case "Socks5ProxySettings": socks5ProxySettings = Socks5ProxySettings.Create("different", 1080, "user", "password"); break;
231235
case "SrvMaxHosts": srvMaxHosts = 3; break;
232236
case "SrvServiceName": srvServiceName = "customname"; break;
233237
case "SslSettings": sslSettings.CheckCertificateRevocation = !sslSettings.CheckCertificateRevocation; break;
@@ -268,7 +272,7 @@ private ClusterKey CreateSubject(string notEqualFieldName = null)
268272
serverMonitoringMode,
269273
serverSelectionTimeout,
270274
socketTimeout,
271-
null, //TODO Add correct proxy for tests
275+
socks5ProxySettings,
272276
srvMaxHosts,
273277
srvServiceName,
274278
sslSettings,

0 commit comments

Comments
 (0)