From df576338038951715f6a41f939793bb76ce4ff67 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 4 Jan 2024 16:07:19 -0600 Subject: [PATCH] attempting to debug Akka.Persistence.TestKit.Tests --- .../Akka.Persistence.TestKit.Tests/Bug4762FixSpec.cs | 10 ++++++++-- .../Journal/JournalRecoveryBehavior.cs | 2 +- .../Journal/JournalRecoveryBehaviorSetter.cs | 2 +- .../Journal/JournalWriteBehaviorSetter.cs | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/core/Akka.Persistence.TestKit.Tests/Bug4762FixSpec.cs b/src/core/Akka.Persistence.TestKit.Tests/Bug4762FixSpec.cs index 6593f12efb5..1da423b95fe 100644 --- a/src/core/Akka.Persistence.TestKit.Tests/Bug4762FixSpec.cs +++ b/src/core/Akka.Persistence.TestKit.Tests/Bug4762FixSpec.cs @@ -13,6 +13,7 @@ using Akka.Actor; using Akka.Event; using Xunit; +using Xunit.Abstractions; namespace Akka.Persistence.TestKit.Tests { @@ -21,6 +22,11 @@ namespace Akka.Persistence.TestKit.Tests /// public class Bug4762FixSpec : PersistenceTestKit { + public Bug4762FixSpec(ITestOutputHelper outputHelper) : base(output: outputHelper) + { + + } + private class WriteMessage { } @@ -65,10 +71,10 @@ protected override void OnRecover(object message) } [Fact] - public async Task TestJournal_PersistAll_should_only_count_each_event_exceptions_once() + public Task TestJournal_PersistAll_should_only_count_each_event_exceptions_once() { var probe = CreateTestProbe(); - await WithJournalWrite(write => write.Pass(), async () => + return WithJournalWrite(write => write.Pass(), async () => { var actor = ActorOf(() => new TestActor2(probe)); Watch(actor); diff --git a/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehavior.cs b/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehavior.cs index 0a4e974c64d..8a1e2d90f7e 100644 --- a/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehavior.cs +++ b/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehavior.cs @@ -17,7 +17,7 @@ public class JournalRecoveryBehavior { internal JournalRecoveryBehavior(IJournalBehaviorSetter setter) { - this.Setter = setter; + Setter = setter; } private IJournalBehaviorSetter Setter { get; } diff --git a/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehaviorSetter.cs b/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehaviorSetter.cs index d9a543ac7d6..b9cc55c534c 100644 --- a/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehaviorSetter.cs +++ b/src/core/Akka.Persistence.TestKit/Journal/JournalRecoveryBehaviorSetter.cs @@ -18,7 +18,7 @@ internal class JournalRecoveryBehaviorSetter : IJournalBehaviorSetter { internal JournalRecoveryBehaviorSetter(IActorRef journal) { - this._journal = journal; + _journal = journal; } private readonly IActorRef _journal; diff --git a/src/core/Akka.Persistence.TestKit/Journal/JournalWriteBehaviorSetter.cs b/src/core/Akka.Persistence.TestKit/Journal/JournalWriteBehaviorSetter.cs index 9623aecbad4..7e554be403a 100644 --- a/src/core/Akka.Persistence.TestKit/Journal/JournalWriteBehaviorSetter.cs +++ b/src/core/Akka.Persistence.TestKit/Journal/JournalWriteBehaviorSetter.cs @@ -18,7 +18,7 @@ internal class JournalWriteBehaviorSetter : IJournalBehaviorSetter { internal JournalWriteBehaviorSetter(IActorRef journal) { - this._journal = journal; + _journal = journal; } private readonly IActorRef _journal;