Skip to content

Commit

Permalink
HHH-14899 StaleObjectStateExceptionHandlingTest should expect a Stale…
Browse files Browse the repository at this point in the history
…StateException
  • Loading branch information
Sanne committed Oct 26, 2021
1 parent 634c257 commit 7f71dca
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import javax.persistence.PersistenceException;
import javax.persistence.RollbackException;

import org.hibernate.StaleObjectStateException;
import org.hibernate.StaleStateException;
import org.hibernate.TransactionException;
import org.hibernate.TransientObjectException;
import org.hibernate.exception.ConstraintViolationException;
Expand Down Expand Up @@ -68,7 +68,7 @@ public void onGetSingleResultWithNoResults(RuntimeException e) {
@Override
public void onStaleObjectMergeAndUpdateFlush(RuntimeException e) {
assertThat( e, instanceOf( OptimisticLockException.class ) );
assertThat( e.getCause(), instanceOf( StaleObjectStateException.class ) );
assertThat( e.getCause(), instanceOf( StaleStateException.class ) );
}

@Override
Expand Down Expand Up @@ -145,7 +145,7 @@ public void onGetSingleResultWithNoResults(RuntimeException e) {

@Override
public void onStaleObjectMergeAndUpdateFlush(RuntimeException e) {
assertThat( e, instanceOf( StaleObjectStateException.class ) );
assertThat( e, instanceOf( StaleStateException.class ) );
}

@Override
Expand Down Expand Up @@ -221,7 +221,7 @@ public void onGetSingleResultWithNoResults(RuntimeException e) {
@Override
public void onStaleObjectMergeAndUpdateFlush(RuntimeException e) {
assertThat( e, instanceOf( OptimisticLockException.class ) );
assertThat( e.getCause(), instanceOf( StaleObjectStateException.class ) );
assertThat( e.getCause(), instanceOf( StaleStateException.class ) );
}

@Override
Expand Down

0 comments on commit 7f71dca

Please sign in to comment.