From 7f71dca1aee845bd8bfe5055ed6b31c3d912de52 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 26 Oct 2021 10:30:01 +0100 Subject: [PATCH] HHH-14899 StaleObjectStateExceptionHandlingTest should expect a StaleStateException --- .../test/exceptionhandling/ExceptionExpectations.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/exceptionhandling/ExceptionExpectations.java b/hibernate-core/src/test/java/org/hibernate/test/exceptionhandling/ExceptionExpectations.java index 7c8dbc6081..7e81d16b30 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/exceptionhandling/ExceptionExpectations.java +++ b/hibernate-core/src/test/java/org/hibernate/test/exceptionhandling/ExceptionExpectations.java @@ -12,7 +12,7 @@ import javax.persistence.OptimisticLockException; 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; @@ -68,7 +68,7 @@ interface ExceptionExpectations { @Override public void onStaleObjectMergeAndUpdateFlush(RuntimeException e) { assertThat( e, instanceOf( OptimisticLockException.class ) ); - assertThat( e.getCause(), instanceOf( StaleObjectStateException.class ) ); + assertThat( e.getCause(), instanceOf( StaleStateException.class ) ); } @Override @@ -145,7 +145,7 @@ interface ExceptionExpectations { @Override public void onStaleObjectMergeAndUpdateFlush(RuntimeException e) { - assertThat( e, instanceOf( StaleObjectStateException.class ) ); + assertThat( e, instanceOf( StaleStateException.class ) ); } @Override @@ -221,7 +221,7 @@ interface ExceptionExpectations { @Override public void onStaleObjectMergeAndUpdateFlush(RuntimeException e) { assertThat( e, instanceOf( OptimisticLockException.class ) ); - assertThat( e.getCause(), instanceOf( StaleObjectStateException.class ) ); + assertThat( e.getCause(), instanceOf( StaleStateException.class ) ); } @Override