Skip to content

Commit

Permalink
extend timeout for test to 5 sec;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Oct 12, 2022
1 parent ee297ef commit 252cb99
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

import org.eclipse.ditto.base.model.auth.AuthorizationSubject;
import org.eclipse.ditto.internal.utils.pubsub.DistributedPub;
Expand All @@ -42,6 +43,7 @@
import akka.testkit.TestActorRef;
import akka.testkit.TestProbe;
import akka.testkit.javadsl.TestKit;
import scala.concurrent.duration.FiniteDuration;

/**
* Abstract base class for all {@link org.eclipse.ditto.things.service.enforcement.ThingEnforcement} related unit tests.
Expand Down Expand Up @@ -125,7 +127,8 @@ public <S extends ThingEvent<?>> Object wrapForPublicationWithAcks(final S messa

protected void expectAndAnswerSudoRetrieveThing(final Object sudoRetrieveThingResponse) {
final SudoRetrieveThing sudoRetrieveThing =
thingPersistenceActorProbe.expectMsgClass(SudoRetrieveThing.class);
thingPersistenceActorProbe.expectMsgClass(FiniteDuration.apply(5, TimeUnit.SECONDS),
SudoRetrieveThing.class);
assertThat((CharSequence) sudoRetrieveThing.getEntityId()).isEqualTo(THING_ID);
thingPersistenceActorProbe.reply(sudoRetrieveThingResponse);
}
Expand Down

0 comments on commit 252cb99

Please sign in to comment.