Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 229574 Details for
Bug 405366
org.eclipse.persistence.testing.tests.jpa.jpql.JUnitJPQLValidationTestSuite.testInvalidSetClause only failed on JBoss server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed test case fix
0001-Bug-405366-org.eclipse.persistence.testing.tests.jpa.patch (text/plain), 3.89 KB, created by
Chris Delahunt
on 2013-04-10 12:07:01 EDT
(
hide
)
Description:
proposed test case fix
Filename:
MIME Type:
Creator:
Chris Delahunt
Created:
2013-04-10 12:07:01 EDT
Size:
3.89 KB
patch
obsolete
>From 7360a0969f8d7044a59335527ac3156d7df3c5b7 Mon Sep 17 00:00:00 2001 >From: Chris Delahunt <christopher.delahunt@oracle.com> >Date: Wed, 10 Apr 2013 12:05:22 -0400 >Subject: [PATCH] Bug 405366 - > org.eclipse.persistence.testing.tests.jpa.jpql.JUnitJPQLValidationTestSuite.testInvalidSetClause > only failed on JBoss server Fixes test case issues arising > due to changes for Bug 404294 - "EclipseLink incorrectly > uses active transactions despite not being joined to them" > - simple change to have the test start a new transaction > when the first gets marked for rollback. > >--- > .../jpa/jpql/JUnitJPQLValidationTestSuite.java | 52 +++++++++++----------- > 1 file changed, 26 insertions(+), 26 deletions(-) > >diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java >index 55bbb4e..91c37f2 100644 >--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java >+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java >@@ -1198,38 +1198,38 @@ public class JUnitJPQLValidationTestSuite extends JUnitTestCase > } > } > >- public void testInvalidSetClause() >- { >+ public void testInvalidSetClause() { > String ejbqlString; > EntityManager em = createEntityManager(); > beginTransaction(em); >- try { >- try >- { >- ejbqlString = "UPDATE Employee e SET e.projects = NULL"; >- em.createQuery(ejbqlString).executeUpdate(); >- fail ("Failed to throw expected IllegalArgumentException for query " + >- " updating a collection valued relationship."); >- } catch(IllegalArgumentException ex) >- { >- Assert.assertTrue(ex.getCause() instanceof JPQLException); >- } >- >- try >- { >- ejbqlString = "UPDATE Employee e SET e.department.name = 'CHANGED'"; >- em.createQuery(ejbqlString).executeUpdate(); >- fail ("Failed to throw expected IllegalArgumentException for query " + >- " updating a sate field of a related instance."); >- } catch(IllegalArgumentException ex) >- { >- Assert.assertTrue(ex.getCause() instanceof JPQLException); >- } >+ try { >+ ejbqlString = "UPDATE Employee e SET e.projects = NULL"; >+ em.createQuery(ejbqlString).executeUpdate(); >+ fail ("Failed to throw expected IllegalArgumentException for query " + >+ " updating a collection valued relationship."); >+ } catch(IllegalArgumentException ex) { >+ Assert.assertTrue(ex.getCause() instanceof JPQLException); > } finally { >- rollbackTransaction(em); >+ closeEntityManagerAndTransaction(em); >+ } >+ >+ //above exception would have marked the transaction for rollback, >+ //so the test needs to start a new one >+ em = createEntityManager(); >+ beginTransaction(em); >+ >+ try >+ { >+ ejbqlString = "UPDATE Employee e SET e.department.name = 'CHANGED'"; >+ em.createQuery(ejbqlString).executeUpdate(); >+ fail ("Failed to throw expected IllegalArgumentException for query " + >+ " updating a sate field of a related instance."); >+ } catch(IllegalArgumentException ex) { >+ Assert.assertTrue(ex.getCause() instanceof JPQLException); >+ } finally { >+ closeEntityManagerAndTransaction(em); > } > } >- > > public void testUnsupportedCountDistinctOnOuterJoinedCompositePK() { > try { >-- >1.7.11.msysgit.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 405366
: 229574