Skip to content

Commit

Permalink
Fix sharding unit test, extend wait time (#379)
Browse files Browse the repository at this point in the history
* Fix sharding unit test, extend wait time

* Bump second unit test wait time
  • Loading branch information
Arkatufus authored Mar 4, 2024
1 parent 4967251 commit ced20db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Akka.Persistence.Azure.Tests/ClusterShardingSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Akka.Event;
using Akka.TestKit;
using FluentAssertions;
using FluentAssertions.Extensions;
using Xunit;

namespace Akka.Persistence.Azure.Tests;
Expand Down Expand Up @@ -89,7 +90,7 @@ public async Task ResetActorTest()
{
// basic test, shard actor should wake up and persist message
_shardRegion.Tell(new ShardEnvelope(PId, "wake-up"));
var persistActor = _probe.ExpectMsg<IActorRef>();
var persistActor = _probe.ExpectMsg<IActorRef>(20.Seconds());
_probe.Watch(persistActor);

_shardRegion.Tell(new ShardEnvelope(PId, "a"));
Expand Down Expand Up @@ -147,7 +148,7 @@ public async Task RepeatedResetActorTest()
foreach (var _ in Enumerable.Range(0, 100))
{
_shardRegion.Tell(new ShardEnvelope(PId, "wake-up"));
var persistActor = _probe.ExpectMsg<IActorRef>();
var persistActor = _probe.ExpectMsg<IActorRef>(20.Seconds());
if (oldActor is not null)
persistActor.Should().NotBe(oldActor);
_probe.Watch(persistActor);
Expand Down

0 comments on commit ced20db

Please sign in to comment.