You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/12/01 13:32:57 UTC
[isis] branch spring6 updated: ISIS-3275: test fixes for causeway-persistence-jdo-spring
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/spring6 by this push:
new 68390f1f61 ISIS-3275: test fixes for causeway-persistence-jdo-spring
68390f1f61 is described below
commit 68390f1f61e928070bdf83188768faf15973669d
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Dec 1 14:32:50 2022 +0100
ISIS-3275: test fixes for causeway-persistence-jdo-spring
---
.../java/javax/transaction/Synchronization.java | 27 ++++++++++++++++++++++
.../integration/JdoTransactionManagerTests.java | 10 ++++----
2 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/persistence/jdo/spring/src/test/java/javax/transaction/Synchronization.java b/persistence/jdo/spring/src/test/java/javax/transaction/Synchronization.java
new file mode 100644
index 0000000000..c9ad907bb9
--- /dev/null
+++ b/persistence/jdo/spring/src/test/java/javax/transaction/Synchronization.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package javax.transaction;
+
+/**
+ * fixes class not found issues when mocking up javax.jdo.Transaction from javax.jdo-3.2.1
+ * (not released; not exported; just for local junit tests)
+ */
+public interface Synchronization extends jakarta.transaction.Synchronization {
+
+}
diff --git a/persistence/jdo/spring/src/test/java/org/apache/causeway/persistence/jdo/spring/test/integration/JdoTransactionManagerTests.java b/persistence/jdo/spring/src/test/java/org/apache/causeway/persistence/jdo/spring/test/integration/JdoTransactionManagerTests.java
index f034f4fe92..9555c0220f 100644
--- a/persistence/jdo/spring/src/test/java/org/apache/causeway/persistence/jdo/spring/test/integration/JdoTransactionManagerTests.java
+++ b/persistence/jdo/spring/src/test/java/org/apache/causeway/persistence/jdo/spring/test/integration/JdoTransactionManagerTests.java
@@ -31,9 +31,12 @@ import javax.jdo.PersistenceManagerFactory;
import javax.jdo.Transaction;
import javax.sql.DataSource;
+import jakarta.transaction.Status;
+import jakarta.transaction.TransactionManager;
+import jakarta.transaction.UserTransaction;
+
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.jdbc.datasource.ConnectionHandle;
import org.springframework.jdbc.datasource.ConnectionHolder;
@@ -67,13 +70,8 @@ import org.apache.causeway.persistence.jdo.spring.integration.TransactionAwarePe
import org.apache.causeway.persistence.jdo.spring.support.SpringPersistenceManagerProxyBean;
import org.apache.causeway.persistence.jdo.spring.support.StandardPersistenceManagerProxyBean;
-import jakarta.transaction.Status;
-import jakarta.transaction.TransactionManager;
-import jakarta.transaction.UserTransaction;
import lombok.val;
-//TODO[ISIS-3275] all failing with Mockito cannot mock this class: interface javax.jdo.Transaction.
-@Disabled
class JdoTransactionManagerTests {
private MetaModelContext mmc;