-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.3] Implement cross platform primitive serializer (#7182)
* Change the base class of PrimitiveSerializers to SerializerWithStringManifest (#4989) * Change the base class of PrimitiveSerializers to SerializerWithStringManifest * Add backward compatibility to the wire format * Update API Approver list (cherry picked from commit 25246ac) * cherry-picked from 6101fea Add backward compatibility to PrimitiveSerializers (#5280) * Add backward compatibility to PrimitiveSerializers * Update API Approver list * Change PrimitiveSerializer compatibility switch setting name from `use-neutral-primitives` to `use-legacy-behavior` for less ambiguity (#5290) * Change PrimitiveSerializer compatibility switch setting name from `use-neutral-primitives` to `use-legacy-behavior` for less ambiguity * Fix unit test * Change default to full compatibility (on) * Fix unit test Co-authored-by: Aaron Stannard <aaron@petabridge.com> (cherry picked from commit 302e3cb) * Code cleanup * Fix FSharp.Core package problem * Fix CI/CD script - Change vmimage to windows-latest and ubuntu-latest * Fix CI/CD script - Install SDK * Bump net45 target to net452 * Fix CI/CD script * Bump Incrementalist.Cmd to 0.9.0 * Revert "Bump net45 target to net452" This reverts commit 2d0d76d. * Revert "Code cleanup" This reverts commit d72b753. * Code cleanup * Code cleanup
- Loading branch information
Showing
18 changed files
with
180 additions
and
39 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
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
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
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
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
43 changes: 43 additions & 0 deletions
43
src/core/Akka.Remote.Tests/Serialization/BugFix5279Spec.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,43 @@ | ||
// //----------------------------------------------------------------------- | ||
// // <copyright file="BugFix5279Spec.cs" company="Akka.NET Project"> | ||
// // Copyright (C) 2009-2021 Lightbend Inc. <http://www.lightbend.com> | ||
// // Copyright (C) 2013-2021 .NET Foundation <https://github.com/akkadotnet/akka.net> | ||
// // </copyright> | ||
// //----------------------------------------------------------------------- | ||
|
||
using Akka.Actor; | ||
using Akka.Configuration; | ||
using Akka.Remote.Serialization; | ||
using Akka.TestKit; | ||
using Akka.Util; | ||
using Xunit; | ||
using FluentAssertions; | ||
|
||
namespace Akka.Remote.Tests.Serialization | ||
{ | ||
public class BugFix5279Spec: AkkaSpec | ||
{ | ||
[Theory] | ||
[InlineData(1, "I")] | ||
[InlineData(1L, "L")] | ||
[InlineData("1", "S")] | ||
public void PrimitiveSerializer_without_useNeutralPrimitives_should_return_custom_manifest(object data, string manifest) | ||
{ | ||
var config = ConfigurationFactory.ParseString("use-legacy-behavior = off"); | ||
var serializer = new PrimitiveSerializers((ExtendedActorSystem)Sys, config); | ||
serializer.Manifest(data).Should().Be(manifest); | ||
} | ||
|
||
[Theory] | ||
[InlineData(1)] | ||
[InlineData(1L)] | ||
[InlineData("1")] | ||
public void PrimitiveSerializer_without_useNeutralPrimitives_should_return_type_manifest(object data) | ||
{ | ||
var config = ConfigurationFactory.ParseString("use-legacy-behavior = on"); | ||
var serializer = new PrimitiveSerializers((ExtendedActorSystem)Sys, config); | ||
serializer.Manifest(data).Should().Be(data.GetType().TypeQualifiedName()); | ||
} | ||
|
||
} | ||
} |
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
Oops, something went wrong.