You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2022/07/31 21:22:49 UTC
[isis-app-simpleapp] 02/02: fixing integ tests (wip)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch jdo-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git
commit f3428f0c7a1ea1a797513fc7abbe4d291718dc7d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Jul 31 22:22:39 2022 +0100
fixing integ tests (wip)
---
.../modules/simple/integtests/tests/SimpleObjects_IntegTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java b/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java
index bad136d..748edd9 100644
--- a/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java
+++ b/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java
@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Optional;
import javax.inject.Inject;
+import javax.jdo.JDOFatalDataStoreException;
import javax.persistence.RollbackException;
import org.assertj.core.api.Assertions;
@@ -23,6 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import org.apache.isis.applib.services.iactnlayer.InteractionService;
import org.apache.isis.applib.services.xactn.TransactionService;
import org.apache.isis.commons.functional.Try;
+import org.apache.isis.persistence.jdo.spring.exceptions.JdoResourceFailureException;
import org.apache.isis.testing.unittestsupport.applib.matchers.ThrowableMatchers;
import lombok.val;
@@ -106,8 +108,8 @@ public class SimpleObjects_IntegTest extends SimpleModuleIntegTestAbstract {
assertThat(attempt.isFailure()).isTrue();
val failureIfAny = attempt.getFailure();
assertThat(failureIfAny).isPresent();
- assertThat(failureIfAny.get()).isInstanceOf(TransactionSystemException.class);
- assertThat(failureIfAny.get().getCause()).isInstanceOf(RollbackException.class);
+ assertThat(failureIfAny.get()).isInstanceOf(JdoResourceFailureException.class);
+ assertThat(failureIfAny.get()).hasMessageContaining("rollback-only");
}