Skip to content

Commit

Permalink
Merge pull request #1088 from SMI/fix/mongodb-connection-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jas88 committed Mar 7, 2022
2 parents 6f467e5 + b7abf17 commit 6b66f9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions news/1088-bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Use DirectConnection instead of obsolete ConnectionMode. Fixes #990

5 changes: 1 addition & 4 deletions tests/common/Smi.Common.Tests/RequiresMongoDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ public int Port
public A()
{

#pragma warning disable CS0618 // Obsolete
ConnectionMode = ConnectionMode.Direct;
#pragma warning restore CS0618

DirectConnection = true;
ConnectTimeout = new TimeSpan(0, 0, 0, 5);
SocketTimeout = new TimeSpan(0, 0, 0, 5);
HeartbeatTimeout = new TimeSpan(0, 0, 0, 5);
Expand Down

0 comments on commit 6b66f9b

Please sign in to comment.