[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-dev] running [criteria] server tests on server with JPA 1.0 container
|
Hi Adrian,
This is an issue that we need to address. I believe there are two things we
need to do to address this.
1. For each supported application server, we need to figure out what
configuration options we can use to deploy a JPA 2.0 application, likely an
application-managed one. (i.e. Is there a way the application and the server
can be configured to avoid things like JPA 1.0 injection so that the JPA
annotations and API can be used by users) We then need to make the necessary
changes to our test framework to allow those configurations to work. We have
already started working looking for configuration options on WebLogic and have
had some success. We should start that work for other servers as well.
2. We need a JPA 1.0 regression test framework. Candidates for that test
framework are the EclipseLink 1.1.x test framework and possibly the new
eclipselink.jpa.wdf.test classes. I am not particularly familiar with the
eclipselink.jpa.wdf.test classes. Do you know if they can be configured to do
JPA 1.0 testing on the server?
-Tom
Goerler, Adrian wrote:
Hi,
we are attempting to run the JPA server tests on NetWeaver 7.1, which
has a JPA 1.0 container. The container sees JPA 1.0 jars and wraps
entity managers with a JPA 1.0 interface.
Now, the criteria tests are failing as they attempt to invoke the
getCriteriaBuilder method, which does not exist in JPA 1.0.
There is a check in the CriteriaServerTestSuite.suite method, which
should prevent the tests from being executed:
*public* *static* Test suite() {
TestSuite suite = *new* TestSuite();
suite.setName("Criteria ServerTestSuite");
>>>> *if* (! JUnitTestCase./isJPA10/()) {
suite.addTest(AdvancedCompositePKJunitTest./suite/());
suite.addTest(AdvancedCriteriaQueryTestSuite./suite/());
suite.addTest(AdvancedQueryTestSuite./suite/());
suite.addTest(JUnitCriteriaSimpleTestSuite./suite/());
suite.addTest(JUnitCriteriaUnitTestSuite./suite/());
suite.addTest(org.eclipse.persistence.testing.tests.jpa.criteria.metamodel.JUnitCriteriaSimpleTestSuite./suite/());
}
*return* suite;
}
However, the check is executed on the client side, which sees JPA 2 and
hence JUnitTestCase./isJPA10/() returns false on the client.
Consequently, the criteria tests are executed and fail on NetWeaver.
The situation raises some questions:
* How should we deal with the particular case of the criteria queries?
* Should we alter the JUnitTestCase./isJPA10/()method so that it
checks on the server side?
* Should we shift the JUnitTestCase./isJPA10/() method to the 200
individual tests?
* How should we deal with 1.0 containers in general?
* Should we indicate the JPA container version in the
<server>.properties files and check for it (e.g. in build.xml or
at runtime)?
* How can we make visible that tests are not skipped on a server
with JPA 1.0 container?
-Adrian
---
*Adrian Görler
**SAP AG
*Pflichtangaben/Mandatory Disclosure Statements:
_http://www.sap.com/company/legal/impressum.epx_
------------------------------------------------------------------------
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev