-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding v1.3.14-style serialization (#71)
* added proper IActorRef serialization for MongoDb binary format * added all Akka.Persistence.TCK.Serialization specs * added v1.4.0 release notes * close #72
- Loading branch information
1 parent
57faceb
commit 3802e52
Showing
12 changed files
with
211 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
#### 1.3.14 October 04 2019 #### | ||
You can see [the full set of changes for Akka.Persistence.MongoDb v1.3.14 here](https://github.com/akkadotnet/Akka.Persistence.MongoDB/milestone/2). | ||
|
||
This PR fixes a number of problems stemming from implementations of Akka.Persistence.Query implementations that were incorrect. | ||
|
||
**Note: we're working on [adding support for future versions of Akka.Persistence.MongoDB and you should read them here if you plan on continuing to use the plugin](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72).** | ||
#### 1.4.0-beta1 October 30 2019 #### | ||
Beta release of Akka.Persistence.MongoDB which implements the [new standardized Akka.Persistence serialization paradigm](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72) going forward. Has full backwards compatibility for reading events which were written in 1.3.[0-14] style serialization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbJournalSerializationSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.Collections.Generic; | ||
using Akka.Configuration; | ||
using Akka.Persistence.TCK.Serialization; | ||
using Akka.Util.Internal; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Akka.Persistence.MongoDb.Tests.Serialization | ||
{ | ||
[Collection("MongoDbSpec")] | ||
public class MongoDbJournalSerializationSpec : JournalSerializationSpec, IClassFixture<DatabaseFixture> | ||
{ | ||
public static readonly AtomicCounter Counter = new AtomicCounter(0); | ||
private readonly ITestOutputHelper _output; | ||
|
||
public MongoDbJournalSerializationSpec(ITestOutputHelper output, DatabaseFixture databaseFixture) | ||
: base(CreateSpecConfig(databaseFixture, Counter.GetAndIncrement()), nameof(MongoDbJournalSerializationSpec), output) | ||
{ | ||
_output = output; | ||
output.WriteLine(databaseFixture.ConnectionString + Counter.Current); | ||
} | ||
|
||
private static Config CreateSpecConfig(DatabaseFixture databaseFixture, int id) | ||
{ | ||
var specString = @" | ||
akka.test.single-expect-default = 3s | ||
akka.persistence { | ||
publish-plugin-commands = on | ||
journal { | ||
plugin = ""akka.persistence.journal.mongodb"" | ||
mongodb { | ||
class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.MongoDb"" | ||
connection-string = """ + databaseFixture.ConnectionString + @""" | ||
auto-initialize = on | ||
collection = ""EventJournal"" | ||
stored-as = object | ||
} | ||
} | ||
}"; | ||
|
||
return ConfigurationFactory.ParseString(specString); | ||
} | ||
|
||
|
||
[Fact(Skip = "Waiting on better error messages")] | ||
public override void Journal_should_serialize_Persistent_with_EventAdapter_manifest() | ||
{ | ||
base.Journal_should_serialize_Persistent_with_EventAdapter_manifest(); | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbSnapshotStoreSerializationSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using Akka.Configuration; | ||
using Akka.Persistence.TCK.Serialization; | ||
using Akka.Util.Internal; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Akka.Persistence.MongoDb.Tests.Serialization | ||
{ | ||
[Collection("MongoDbSpec")] | ||
public class MongoDbSnapshotStoreSerializationSpec : SnapshotStoreSerializationSpec, IClassFixture<DatabaseFixture> | ||
{ | ||
public static readonly AtomicCounter Counter = new AtomicCounter(0); | ||
private readonly ITestOutputHelper _output; | ||
|
||
public MongoDbSnapshotStoreSerializationSpec(ITestOutputHelper output, DatabaseFixture databaseFixture) | ||
: base(CreateSpecConfig(databaseFixture, Counter.GetAndIncrement()), nameof(MongoDbSnapshotStoreSerializationSpec), output) | ||
{ | ||
_output = output; | ||
output.WriteLine(databaseFixture.ConnectionString + Counter.Current); | ||
} | ||
|
||
private static Config CreateSpecConfig(DatabaseFixture databaseFixture, int id) | ||
{ | ||
var specString = @" | ||
akka.test.single-expect-default = 3s | ||
akka.persistence { | ||
publish-plugin-commands = on | ||
snapshot-store { | ||
plugin = ""akka.persistence.snapshot-store.mongodb"" | ||
mongodb { | ||
class = ""Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore, Akka.Persistence.MongoDb"" | ||
connection-string = """ + databaseFixture.ConnectionString + id + @""" | ||
auto-initialize = on | ||
collection = ""SnapshotStore"" | ||
} | ||
} | ||
}"; | ||
|
||
return ConfigurationFactory.ParseString(specString); | ||
} | ||
} | ||
} |
Oops, something went wrong.