DATAJPA-1405 - Ignore EclipseLink tests with empty collections for version 2.7.2+.
Original pull request: #290.
This commit is contained in:
committed by
Oliver Gierke
parent
cfb87113da
commit
8ff5afb161
@@ -15,16 +15,20 @@
|
||||
*/
|
||||
package org.springframework.data.jpa.repository;
|
||||
|
||||
import static java.util.Arrays.*;
|
||||
import static org.eclipse.persistence.Version.*;
|
||||
import static org.hamcrest.MatcherAssert.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Query;
|
||||
|
||||
import org.eclipse.persistence.Version;
|
||||
import org.junit.Assume;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.jpa.repository.sample.UserRepository;
|
||||
import org.springframework.data.util.Version;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
/**
|
||||
@@ -37,6 +41,8 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
@ContextConfiguration(value = "classpath:eclipselink.xml")
|
||||
public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserRepositoryTests {
|
||||
|
||||
public static final Set<String> BROKEN_ECLIPSE_VERSIONS = new HashSet<String>(asList("2.7.2", "2.7.3", "2.7.4"));
|
||||
|
||||
/**
|
||||
* Ignored until https://bugs.eclipse.org/bugs/show_bug.cgi?id=349477 is resolved.
|
||||
*/
|
||||
@@ -124,7 +130,7 @@ public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserReposi
|
||||
@Test // DATAJPA-1314
|
||||
public void findByEmptyArrayOfIntegers() throws Exception {
|
||||
|
||||
assumeNotEclipseLink2_7_2();
|
||||
assumeNotEclipseLink2_7_2plus();
|
||||
|
||||
super.findByEmptyArrayOfIntegers();
|
||||
}
|
||||
@@ -137,7 +143,7 @@ public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserReposi
|
||||
@Test // DATAJPA-1314
|
||||
public void findByAgeWithEmptyArrayOfIntegersOrFirstName() {
|
||||
|
||||
assumeNotEclipseLink2_7_2();
|
||||
assumeNotEclipseLink2_7_2plus();
|
||||
|
||||
super.findByAgeWithEmptyArrayOfIntegersOrFirstName();
|
||||
}
|
||||
@@ -150,7 +156,7 @@ public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserReposi
|
||||
@Test // DATAJPA-1314
|
||||
public void findByEmptyCollectionOfIntegers() throws Exception {
|
||||
|
||||
assumeNotEclipseLink2_7_2();
|
||||
assumeNotEclipseLink2_7_2plus();
|
||||
|
||||
super.findByEmptyCollectionOfIntegers();
|
||||
}
|
||||
@@ -163,14 +169,14 @@ public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserReposi
|
||||
@Test // DATAJPA-1314
|
||||
public void findByEmptyCollectionOfStrings() throws Exception {
|
||||
|
||||
assumeNotEclipseLink2_7_2();
|
||||
assumeNotEclipseLink2_7_2plus();
|
||||
|
||||
super.findByEmptyCollectionOfStrings();
|
||||
}
|
||||
|
||||
private void assumeNotEclipseLink2_7_2() {
|
||||
private void assumeNotEclipseLink2_7_2plus() {
|
||||
|
||||
Assume.assumeFalse("Empty collections seem to be broken in EclipseLink 2.7.2",
|
||||
Version.getVersion().equals("2.7.2"));
|
||||
Assume.assumeFalse("Empty collections seem to be broken in EclipseLink 2.7.2+",
|
||||
Version.parse(getVersion()).isGreaterThanOrEqualTo(new Version(2, 7, 2)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user