You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ravi P Palacherla (JIRA)" <ji...@apache.org> on 2009/05/11 23:22:45 UTC

[jira] Updated: (OPENJPA-907) org.apache.openjpa.persistence.jdbc.update.TestParentChild

     [ https://issues.apache.org/jira/browse/OPENJPA-907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi P Palacherla updated OPENJPA-907:
--------------------------------------

    Attachment: OPENJPA-907.patch

Patch file to fix this issue.

Please review it and let me know of any suggestions.

Thanks,
Ravi.

> org.apache.openjpa.persistence.jdbc.update.TestParentChild
> ----------------------------------------------------------
>
>                 Key: OPENJPA-907
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-907
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>         Attachments: OPENJPA-907.patch
>
>
> Running org.apache.openjpa.persistence.jdbc.update.TestParentChild
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 31  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 46  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 46  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 32  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 31  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 46  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 78  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 15  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 46  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 47  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5 ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
> 12 assertion failures
> Combination:
> openjpa.jdbc.MappingDefaults : ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
> openjpa.jdbc.SchemaFactory : native(ForeignKeys=false)
> openjpa.jdbc.UpdateManager : operation-order
> * persist-order : CHILD_THEN_PARENT
> junit.framework.AssertionFailedError: Combination
> openjpa.jdbc.MappingDefaults : ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
> openjpa.jdbc.SchemaFactory : native(ForeignKeys=false)
> openjpa.jdbc.UpdateManager : operation-order
> * persist-order : CHILD_THEN_PARENT
>  failed 
>  Expected regular expression
>  <ALTER TABLE .* ADD FOREIGN KEY \(PARENT_ID\) REFERENCES Parent \(id\)>
>  to have existed in SQL statements: 
> SELECT NULL AS SEQUENCE_SCHEMA, relname AS SEQUENCE_NAME FROM pg_class WHERE relkind='S'
> DROP TABLE Child
> DROP TABLE Parent
> SELECT NULL AS SEQUENCE_SCHEMA, relname AS SEQUENCE_NAME FROM pg_class WHERE relkind='S'
> CREATE TABLE Child (id VARCHAR(255) NOT NULL, name VARCHAR(255), PARENT_ID BIGINT, PRIMARY KEY (id))
> CREATE TABLE Parent (id BIGINT NOT NULL, name VARCHAR(255), PRIMARY KEY (id))
> ALTER TABLE Child ADD FOREIGN KEY (PARENT_ID) REFERENCES Parent (id) DEFERRABLE
> SELECT SEQUENCE_VALUE FROM public.OPENJPA_SEQUENCE_TABLE WHERE ID = ? FOR UPDATE
> UPDATE public.OPENJPA_SEQUENCE_TABLE SET SEQUENCE_VALUE = ? WHERE ID = ? AND SEQUENCE_VALUE = ?
> SELECT SEQUENCE_VALUE FROM public.OPENJPA_SEQUENCE_TABLE WHERE ID = ? FOR UPDATE
> UPDATE public.OPENJPA_SEQUENCE_TABLE SET SEQUENCE_VALUE = ? WHERE ID = ? AND SEQUENCE_VALUE = ?
> INSERT INTO public.child (id, name) VALUES (?, ?)
> INSERT INTO public.child (id, name) VALUES (?, ?)
> INSERT INTO public.child (id, name) VALUES (?, ?)
> INSERT INTO public.parent (id, name) VALUES (?, ?)
> UPDATE public.child SET parent_id = ? WHERE id = ?
> UPDATE public.child SET parent_id = ? WHERE id = ?
> UPDATE public.child SET parent_id = ? WHERE id = ?
> SELECT t0.name FROM public.parent t0 WHERE t0.id = ?
> SELECT t0.id, t0.name, t0.parent_id FROM public.child t0 WHERE t0.parent_id = ?
> 	at junit.framework.Assert.fail(Assert.java:47)
> 	at org.apache.openjpa.persistence.test.CombinatorialPersistenceTestCase.assertSQL(CombinatorialPersistenceTestCase.java:100)
> 	at org.apache.openjpa.persistence.jdbc.update.TestParentChild.assertPhysicalForeignKeyCreation(TestParentChild.java:181)
> 	at org.apache.openjpa.persistence.jdbc.update.TestParentChild.testInsert(TestParentChild.java:129)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.openjpa.persistence.test.PersistenceTestCase.runBare(PersistenceTestCase.java:443)
> 	at org.apache.openjpa.persistence.test.CombinatorialPersistenceTestCase.runBare(CombinatorialPersistenceTestCase.java:54)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:173)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.