File tree Expand file tree Collapse file tree 9 files changed +30
-16
lines changed
Akka.Persistence.MongoDb.Tests Expand file tree Collapse file tree 9 files changed +30
-16
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ jobs:
18
18
submodules : recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
19
19
persistCredentials : true
20
20
- task : UseDotNet@2
21
- displayName : ' Use .NET 6 SDK 6.0.100 '
21
+ displayName : ' Use .NET 6 SDK 6.0.407 '
22
22
inputs :
23
- version : 6.0.100
23
+ version : 6.0.407
24
24
- task : UseDotNet@2
25
- displayName : ' Use .NET Core Runtime 3.1.10 '
25
+ displayName : ' Use .NET Core Runtime 3.1.32 '
26
26
inputs :
27
27
packageType : runtime
28
- version : 3.1.10
28
+ version : 3.1.32
29
29
# Linux or macOS
30
30
- task : Bash@3
31
31
displayName : Linux / OSX Build
Original file line number Diff line number Diff line change 24
24
25
25
- template : azure-pipeline.template.yaml
26
26
parameters :
27
- name : ' net_5_tests_linux '
28
- displayName : ' .NET 5 Unit Tests (Linux)'
27
+ name : ' net_6_tests_linux '
28
+ displayName : ' .NET 6 Unit Tests (Linux)'
29
29
vmImage : ' ubuntu-latest'
30
30
scriptFileName : ./build.sh
31
31
scriptArgs : runTestsNet
Original file line number Diff line number Diff line change 32
32
33
33
- template : azure-pipeline.template.yaml
34
34
parameters :
35
- name : ' net_5_tests_windows '
36
- displayName : ' .NET 5 Unit Tests (Windows)'
35
+ name : ' net_6_tests_windows '
36
+ displayName : ' .NET 6 Unit Tests (Windows)'
37
37
vmImage : ' windows-latest'
38
38
scriptFileName : build.cmd
39
39
scriptArgs : runTestsNet
Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ variables:
23
23
value : akkadotnet/Akka.Persistence.MongoDB
24
24
steps :
25
25
- task : UseDotNet@2
26
- displayName : ' Use .NET 6 SDK 6.0.100 '
26
+ displayName : ' Use .NET 6 SDK 6.0.407 '
27
27
inputs :
28
- version : 6.0.100
28
+ version : 6.0.407
29
29
- task : BatchScript@1
30
30
displayName : ' FAKE Build'
31
31
inputs :
Original file line number Diff line number Diff line change 10
10
using Akka . Persistence . TCK . Serialization ;
11
11
using Akka . TestKit ;
12
12
using MongoDB . Driver ;
13
+ using MongoDB . Driver . Linq ;
13
14
using Xunit ;
14
15
using Xunit . Abstractions ;
15
16
@@ -30,8 +31,11 @@ public MongoDbJournalSetupSpec(
30
31
31
32
private static ActorSystemSetup CreateBootstrapSetup ( DatabaseFixture fixture )
32
33
{
34
+ //Default LinqProvider has been changed to LINQ3.LinqProvider can be changed back to LINQ2 in the following way:
33
35
var connectionString = new MongoUrl ( fixture . ConnectionString ) ;
34
- var client = new MongoClient ( connectionString ) ;
36
+ var clientSettings = MongoClientSettings . FromUrl ( connectionString ) ;
37
+ clientSettings . LinqProvider = LinqProvider . V2 ;
38
+ var client = new MongoClient ( clientSettings ) ;
35
39
var databaseName = connectionString . DatabaseName ;
36
40
var settings = client . Settings ;
37
41
Original file line number Diff line number Diff line change 4
4
using Akka . Persistence . TCK . Journal ;
5
5
using Akka . Persistence . TCK . Snapshot ;
6
6
using MongoDB . Driver ;
7
+ using MongoDB . Driver . Linq ;
7
8
using Xunit ;
8
9
using Xunit . Abstractions ;
9
10
@@ -24,8 +25,11 @@ public MongoDbSnapshotStoreSetupSpec(
24
25
25
26
private static ActorSystemSetup CreateBootstrapSetup ( DatabaseFixture fixture )
26
27
{
28
+ //Default LinqProvider has been changed to LINQ3.LinqProvider can be changed back to LINQ2 in the following way:
27
29
var connectionString = new MongoUrl ( fixture . ConnectionString ) ;
28
- var client = new MongoClient ( connectionString ) ;
30
+ var clientSettings = MongoClientSettings . FromUrl ( connectionString ) ;
31
+ clientSettings . LinqProvider = LinqProvider . V2 ;
32
+ var client = new MongoClient ( clientSettings ) ;
29
33
var databaseName = connectionString . DatabaseName ;
30
34
var settings = client . Settings ;
31
35
Original file line number Diff line number Diff line change 11
11
<ItemGroup >
12
12
<PackageReference Include =" Akka.Persistence.Query" Version =" $(AkkaVersion)" />
13
13
<PackageReference Include =" akka.streams" Version =" $(AkkaVersion)" />
14
- <PackageReference Include =" MongoDB.Driver" Version =" 2.18 .0" />
14
+ <PackageReference Include =" MongoDB.Driver" Version =" 2.19 .0" />
15
15
</ItemGroup >
16
16
</Project >
Original file line number Diff line number Diff line change @@ -68,9 +68,11 @@ protected override void PreStart()
68
68
client = new MongoClient ( setupOption . Value . JournalConnectionSettings ) ;
69
69
return client . GetDatabase ( setupOption . Value . JournalDatabaseName ) ;
70
70
}
71
-
71
+ //Default LinqProvider has been changed to LINQ3.LinqProvider can be changed back to LINQ2 in the following way:
72
72
var connectionString = new MongoUrl ( _settings . ConnectionString ) ;
73
- client = new MongoClient ( connectionString ) ;
73
+ var clientSettings = MongoClientSettings . FromUrl ( connectionString ) ;
74
+ clientSettings . LinqProvider = LinqProvider . V2 ;
75
+ client = new MongoClient ( clientSettings ) ;
74
76
return client . GetDatabase ( connectionString . DatabaseName ) ;
75
77
} ) ;
76
78
_journalCollection = new Lazy < IMongoCollection < JournalEntry > > ( ( ) =>
Original file line number Diff line number Diff line change 12
12
using Akka . Persistence . Snapshot ;
13
13
using Akka . Util ;
14
14
using MongoDB . Driver ;
15
+ using MongoDB . Driver . Linq ;
15
16
16
17
namespace Akka . Persistence . MongoDb . Snapshot
17
18
{
@@ -47,8 +48,11 @@ protected override void PreStart()
47
48
var setupOption = Context . System . Settings . Setup . Get < MongoDbPersistenceSetup > ( ) ;
48
49
if ( ! setupOption . HasValue || setupOption . Value . SnapshotConnectionSettings == null )
49
50
{
51
+ //Default LinqProvider has been changed to LINQ3.LinqProvider can be changed back to LINQ2 in the following way:
50
52
var connectionString = new MongoUrl ( _settings . ConnectionString ) ;
51
- client = new MongoClient ( connectionString ) ;
53
+ var clientSettings = MongoClientSettings . FromUrl ( connectionString ) ;
54
+ clientSettings . LinqProvider = LinqProvider . V2 ;
55
+ client = new MongoClient ( clientSettings ) ;
52
56
snapshot = client . GetDatabase ( connectionString . DatabaseName ) ;
53
57
}
54
58
else
You can’t perform that action at this time.
0 commit comments