Skip to content

Commit

Permalink
fail test if Optional FactHandle is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
nprentza committed Jul 11, 2023
1 parent e6cc24d commit 0feb720
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ void insertFailoverDeleteFailoverInsert_shouldRecoverAndMatchRules(PersistedSess
clearResults();

Optional<FactHandle> getFactHandleForPerson = getFactHandle(pEleven);
if (!getFactHandleForPerson.isEmpty()){
delete(getFactHandleForPerson.get());
}
assertThat(getFactHandleForPerson.isEmpty()).isFalse();
delete(getFactHandleForPerson.get());

failover();

Expand Down Expand Up @@ -238,9 +237,8 @@ void multiplKieSession_insertFailoverDeleteFailoverInsert_shouldRecoverAndMatchR
clearResults(session2);

Optional<FactHandle> getFactHandleForPerson = getFactHandle(session2, pEleven);
if (!getFactHandleForPerson.isEmpty()){
delete(session2, getFactHandleForPerson.get());
}
assertThat(getFactHandleForPerson.isEmpty()).isFalse();
delete(session2, getFactHandleForPerson.get());

failover();

Expand Down

0 comments on commit 0feb720

Please sign in to comment.