@@ -38,12 +38,8 @@ namespace MongoDB.Driver.Core.Tests.Jira
38
38
{
39
39
public class CSharp3302Tests
40
40
{
41
- #pragma warning disable CS0618 // Type or member is obsolete
42
41
private readonly static ClusterConnectionMode __clusterConnectionMode = ClusterConnectionMode . ReplicaSet ;
43
- private readonly static ConnectionModeSwitch __connectionModeSwitch = ConnectionModeSwitch . UseConnectionMode ;
44
- #pragma warning restore CS0618 // Type or member is obsolete
45
42
private readonly static ClusterId __clusterId = new ClusterId ( ) ;
46
- private readonly static bool ? __directConnection = null ;
47
43
private readonly static EndPoint __endPoint1 = new DnsEndPoint ( "localhost" , 27017 ) ;
48
44
private readonly static EndPoint __endPoint2 = new DnsEndPoint ( "localhost" , 27018 ) ;
49
45
private readonly static TimeSpan __heartbeatInterval = TimeSpan . FromMilliseconds ( 200 ) ;
@@ -55,7 +51,6 @@ public async Task RapidHeartbeatTimerCallback_should_ignore_reentrant_calls()
55
51
{
56
52
var clusterSettings = new ClusterSettings (
57
53
connectionMode : __clusterConnectionMode ,
58
- connectionModeSwitch : __connectionModeSwitch ,
59
54
serverSelectionTimeout : TimeSpan . FromSeconds ( 30 ) ,
60
55
endPoints : new [ ] { __endPoint1 } ) ;
61
56
@@ -236,7 +231,6 @@ private MultiServerCluster CreateAndSetupCluster(HashSet<ServerId> primaries)
236
231
237
232
var clusterSettings = new ClusterSettings (
238
233
connectionMode : __clusterConnectionMode ,
239
- connectionModeSwitch : __connectionModeSwitch ,
240
234
serverSelectionTimeout : TimeSpan . FromSeconds ( 30 ) ,
241
235
endPoints : serverInfoCollection . Select ( c => c . Endpoint ) . ToArray ( ) ) ;
242
236
@@ -250,7 +244,7 @@ private MultiServerCluster CreateAndSetupCluster(HashSet<ServerId> primaries)
250
244
var serverMonitorConnectionFactory = CreateAndSetupServerMonitorConnectionFactory ( primaries , serverInfoCollection ) ;
251
245
var serverMonitorFactory = new ServerMonitorFactory ( serverMonitorSettings , serverMonitorConnectionFactory , eventCapturer ) ;
252
246
253
- var serverFactory = new ServerFactory ( __clusterConnectionMode , __connectionModeSwitch , __directConnection , serverSettings , connectionPoolFactory , serverMonitorFactory , eventCapturer ) ;
247
+ var serverFactory = new ServerFactory ( __clusterConnectionMode , serverSettings , connectionPoolFactory , serverMonitorFactory , eventCapturer ) ;
254
248
return new MultiServerCluster ( clusterSettings , serverFactory , eventCapturer ) ;
255
249
}
256
250
@@ -268,7 +262,7 @@ private IServerSelector CreateWritableServerAndEndPointSelector(EndPoint endPoin
268
262
private void ForceClusterId ( MultiServerCluster cluster , ClusterId clusterId )
269
263
{
270
264
Reflector . SetFieldValue ( cluster , "_clusterId" , clusterId ) ;
271
- Reflector . SetFieldValue ( cluster , "_description" , ClusterDescription . CreateInitial ( clusterId , __clusterConnectionMode , __connectionModeSwitch , __directConnection ) ) ;
265
+ Reflector . SetFieldValue ( cluster , "_description" , ClusterDescription . CreateInitial ( clusterId , __clusterConnectionMode ) ) ;
272
266
}
273
267
274
268
private void SetupServerMonitorConnection (
0 commit comments