From 6f4e7f3703872f212a8ccba8a0ffc5de6207a3f2 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 1 Apr 2015 13:10:07 +0200 Subject: [PATCH] DATAJPA-698 - Upgraded to EclipseLink 2.5.2. Slightly refactored general infrastructure integration tests to make sure they're executed during the build. Added neccesary ignores to prevent the test cases from running into spec violations. --- pom.xml | 8 +--- .../EclipseLinkMetamodelIntegrationTests.java | 10 ++++- .../HibernateMetamodelIntegrationTests.java | 38 +++++++++++++++++++ .../MetamodelIntegrationTests.java | 2 +- .../OpenJpaMetamodelIntegrationTests.java | 8 +++- .../EclipseLinkUserRepositoryFinderTests.java | 8 ++-- 6 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java diff --git a/pom.xml b/pom.xml index 98cf8449f..5cb86c3b0 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ DATAJPA - 2.5.1 + 2.5.2 3.6.10.Final 1.8.0.10 2.0.0 @@ -245,11 +245,6 @@ runtime - - - **/infrastructure/* - - default-test @@ -286,7 +281,6 @@ **/*UnitTests.java **/OpenJpa* **/EclipseLink* - **/infrastructure/* -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar diff --git a/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java b/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java index b8a4bfa19..0bdd8edd1 100644 --- a/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java +++ b/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java @@ -33,7 +33,13 @@ public class EclipseLinkMetamodelIntegrationTests extends MetamodelIntegrationTe @Test @Ignore @Override - public void canAccessParametersByIndexForNativeQueries() { + public void canAccessParametersByIndexForNativeQueries() {} - } + /** + * TODO: Remove, once https://bugs.eclipse.org/bugs/show_bug.cgi?id=463663 is fixed. + */ + @Test + @Ignore + @Override + public void pathToEntityIsOfBindableTypeEntityType() {} } diff --git a/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java b/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java new file mode 100644 index 000000000..379f30e70 --- /dev/null +++ b/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java @@ -0,0 +1,38 @@ +/* + * Copyright 2015 the original author or authors. + * + * Licensed 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 org.springframework.data.jpa.infrastructure; + +import org.junit.Ignore; +import org.junit.Test; + +/** + * Hibernate-specific integration test using the JPA metamodel. + * + * @author Oliver Gierke + * @soundtrack Umphrey's McGee - Intentions Clear (Safety In Numbers) + */ +public class HibernateMetamodelIntegrationTests extends MetamodelIntegrationTests { + + @Test + @Ignore + @Override + public void pathToEntityIsOfBindableTypeEntityType() {} + + @Test + @Ignore + @Override + public void considersOneToOneAttributeAnAssociation() {} +} diff --git a/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java b/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java index 9e5fecdf7..4f96de0d8 100644 --- a/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java +++ b/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java @@ -41,7 +41,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({ "classpath:infrastructure.xml" }) -public class MetamodelIntegrationTests { +public abstract class MetamodelIntegrationTests { @PersistenceContext EntityManager em; diff --git a/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java b/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java index f84df8b11..2bd5b0fd4 100644 --- a/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java +++ b/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ */ package org.springframework.data.jpa.infrastructure; +import org.junit.Ignore; +import org.junit.Test; import org.springframework.test.context.ContextConfiguration; /** @@ -25,4 +27,8 @@ import org.springframework.test.context.ContextConfiguration; @ContextConfiguration("classpath:openjpa.xml") public class OpenJpaMetamodelIntegrationTests extends MetamodelIntegrationTests { + @Test + @Ignore + @Override + public void canAccessParametersByIndexForNativeQueries() {} } diff --git a/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java b/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java index f6d6ec9c3..71a2e2600 100644 --- a/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java +++ b/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 the original author or authors. + * Copyright 2011-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,11 +29,9 @@ public class EclipseLinkUserRepositoryFinderTests extends UserRepositoryFinderTe @Ignore @Override - public void executesNotInQueryCorrectly() throws Exception { - } + public void executesNotInQueryCorrectly() throws Exception {} @Ignore @Override - public void executesInKeywordForPageCorrectly() { - } + public void executesInKeywordForPageCorrectly() {} }