Skip to content

Commit

Permalink
fixed Akka.Persistence.Tck snapshot load specs (#7320)
Browse files Browse the repository at this point in the history
* fixed Akka.Persistence.Tck snapshot load specs

Left-over bugs from #7313

* fixed the specs
  • Loading branch information
Aaronontheweb committed Aug 16, 2024
1 parent d6a8063 commit 96c6a60
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Akka.Persistence.Fsm;
using Akka.Persistence.TCK.Serialization;
using Akka.TestKit;
using FluentAssertions;
using FluentAssertions.Extensions;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -184,7 +185,7 @@ public virtual void SnapshotStore_should_load_the_most_recent_snapshot_matching_
public virtual void SnapshotStore_should_delete_a_single_snapshot_identified_by_SequenceNr_in_snapshot_metadata()
{
var md = Metadata[2];
md = new SnapshotMetadata(md.PersistenceId, md.SequenceNr, Sys.Scheduler.Now.DateTime);
md = new SnapshotMetadata(md.PersistenceId, md.SequenceNr, md.Timestamp);
var command = new DeleteSnapshot(md);
var sub = CreateTestProbe();

Expand All @@ -195,10 +196,10 @@ public virtual void SnapshotStore_should_delete_a_single_snapshot_identified_by_

SnapshotStore.Tell(new LoadSnapshot(Pid, new SnapshotSelectionCriteria(md.SequenceNr), long.MaxValue), _senderProbe.Ref);
_senderProbe.ExpectMsg<LoadSnapshotResult>(result =>
result.ToSequenceNr == long.MaxValue
&& result.Snapshot != null
&& result.Snapshot.Metadata.Equals(Metadata[1])
&& result.Snapshot.Snapshot.ToString() == "s-2");
result.ToSequenceNr == long.MaxValue
&& result.Snapshot != null
&& result.Snapshot.Metadata.Equals(Metadata[1])
&& result.Snapshot.Snapshot.ToString() == "s-2");
}

// Issue #7312
Expand Down

0 comments on commit 96c6a60

Please sign in to comment.