Skip to content

Commit

Permalink
update EnforcementFlowTest tests to supports updated cache retrieval …
Browse files Browse the repository at this point in the history
…for _policy enrichment

Signed-off-by: Aleksandar Stanchev <[email protected]>
  • Loading branch information
alstanchev committed Jan 15, 2024
1 parent 96cdbd5 commit 242aa1d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ public void computeThingCacheValueFromThingEvents() {
sourceProbe.sendNext(inputMap);
sourceProbe.sendComplete();

thingsProbe.expectMsgClass(Duration.apply(30, TimeUnit.SECONDS), SudoRetrieveThing.class);
thingsProbe.reply(SudoRetrieveThingResponse.of(JsonObject.empty(), DittoHeaders.empty()));
// WHEN: policy is retrieved with up-to-date revisions
policiesProbe.expectMsgClass(Duration.apply(30, TimeUnit.SECONDS), SudoRetrievePolicy.class);
final var policy = Policy.newBuilder(policyId).setRevision(1).build();
Expand Down Expand Up @@ -319,6 +321,10 @@ public void computeThingCacheValueFromThingEventsWhenLastEventWasDeleted() {
sourceProbe.sendNext(inputMap);
sourceProbe.sendComplete();

// WHEN
thingsProbe.expectMsgClass(Duration.apply(30, TimeUnit.SECONDS), SudoRetrieveThing.class);
thingsProbe.reply(SudoRetrieveThingResponse.of(JsonObject.empty(), DittoHeaders.empty()));

// THEN: the write model contains up-to-date revisions
final AbstractWriteModel deleteModel = sinkProbe.expectNext().get(0);
sinkProbe.expectComplete();
Expand Down

0 comments on commit 242aa1d

Please sign in to comment.