Skip to content

Commit

Permalink
Upgrade MongoDB.Driver to v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wassim-k committed Nov 12, 2024
1 parent e76815e commit 6487f5f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions Orleans.Providers.MongoDB/Orleans.Providers.MongoDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<PackageTags>Orleans OrleansProviders MongoDB</PackageTags>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TargetFrameworks>net8.0</TargetFrameworks>
<Version>8.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,7 +23,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MongoDB.Driver" Version="2.28.0" />
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Test/Host/Orleans.Providers.MongoDB.Test.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EphemeralMongo6" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="MongoSandbox8" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 2 additions & 4 deletions Test/Host/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using EphemeralMongo;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using MongoDB.Bson;
using MongoDB.Bson.Serialization;
using MongoDB.Bson.Serialization.Conventions;
using MongoDB.Bson.Serialization.Serializers;
using MongoSandbox;
using Newtonsoft.Json;
using Orleans.Configuration;
using Orleans.Hosting;
Expand All @@ -25,7 +25,7 @@ public static async Task Main(string[] args)
{
var createShardKey = false;

using var mongoRunner = MongoRunner.Run();
using var mongoRunner = MongoRunner.Run(new MongoRunnerOptions { KillMongoProcessesWhenCurrentProcessExits = true });

Console.WriteLine("MongoDB ConnectionString: {0}", mongoRunner.ConnectionString);

Expand Down Expand Up @@ -216,8 +216,6 @@ private static void ApplyBsonConfiguration()
},
t => true);

// http://mongodb.github.io/mongo-csharp-driver/2.11/reference/bson/guidserialization/guidrepresentationmode/guidrepresentationmode/
BsonDefaults.GuidRepresentationMode = GuidRepresentationMode.V3;
BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));
}
}
Expand Down
2 changes: 1 addition & 1 deletion UnitTest/Fixtures/MongoDatabaseFixture.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using EphemeralMongo;
using MongoDB.Driver;
using MongoSandbox;
using Orleans.Providers.MongoDB.Utils;

namespace Orleans.Providers.MongoDB.UnitTest.Fixtures
Expand Down
7 changes: 3 additions & 4 deletions UnitTest/Orleans.Providers.MongoDB.UnitTest.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Expand All @@ -9,9 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EphemeralMongo6" Version="1.1.3" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MongoSandbox8" Version="1.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
</ItemGroup>

Expand Down

0 comments on commit 6487f5f

Please sign in to comment.