openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-903) org.apache.openjpa.persistence.exception.TestException hangs when run using PostgreSQL 8.3 database
Date Sun, 22 Feb 2009 23:37:02 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675725#action_12675725
] 

Albert Lee commented on OPENJPA-903:
------------------------------------

Tim,

>From posting in http://archives.postgresql.org/pgsql-jdbc/2002-03/msg00170.php

It looks like PostgreSQL does not support query timeout. If this is true, the PostgresDictionary
needs to update the 
        supportsQueryTimeout = false;
in its constructor to reflect this behavior. (like the InformixDictionary)

The test case is trying to validate the scenario that em2 should be blocked and time out on
flush and hence the OptimisticLockException. Of course, replace the flush with commit will
cause the commit to commit and therefore em2.flush will NOT block and the UPDATE statement
with the same version update will result with the expected OptimisticLockException but that
is not the intent of the test case.

I ran TestException against DB2 on the trunk release and it works with a timeout and the expected
OptLockEx..

I suggest :
1) to validate the Postgre's query timeout behavior first and update PostgresDictionary as
needed.
2) to figure out what databases are and are not working/hanging and correlated the queryTimeout
support for each of the db.
3) if the condition is the test case hangs due to no timeout on executing the UPDATE, then
test case can be changed to conditionally run if the db support querytimeout by testing this
dictionary capability.

Hope this help.
Albert Lee

> org.apache.openjpa.persistence.exception.TestException hangs when run using PostgreSQL
8.3 database 
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-903
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-903
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jdbc
>    Affects Versions: 2.0.0
>         Environment: Windows 2003 Server, maven 2.0.9, Java 1.5.0.15, PostgreSQL 8.3.5
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>         Attachments: OPENJPA-903.patch
>
>
> Seems to be hanging in the testThrowsOptimisticException() testcase -- see below:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.openjpa.persistence.exception.TestException
> 31  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 484  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)).

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


Mime
View raw message