db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Torque test (ex runtimetest)
Date Fri, 09 Sep 2005 14:23:06 GMT
The second time I run the test using PostgreSQL I am getting:

    [junit] org.apache.torque.TorqueException:
org.postgresql.util.PSQLException: ERROR: duplicate key violates unique
constraint "null_value_table_pkey"
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    [junit]     at
    [junit]     at
    [junit] Caused by: org.postgresql.util.PSQLException: ERROR:
duplicate key violates unique constraint "null_value_table_pkey"

I suspected it might be caused by a missing:
in the schema for the table NULL_VALUE_TABLE, but apparently this is not
the case.

If I run maven clean I can execute the test again.

Sorry I have no solution for you - I spent enough time today getting up
to speed with the new structure.

I doubt if this is showing up in MySQL.

BTW: Recall the confusion over whether or not Torque will create the DB
for you with PostgreSQL... well it does, but the userid needs to be
granted permission to create them.

Also: Henning and I are pushing for a JCS release so we can update the
version used for Torque 3.2.


Scott Eade
Backstage Technologies Pty. Ltd.

Thomas Fischer wrote:

> Hi,
> I have added into svn two suggestions how to reorganize the old
> runtimetest. The problem with the old runtimetest were the following:
> - one had to build the generator and the templates separately before
>   running the test
> - it was testing the ant version of the generator and not the
>   maven-plugin.
> - it had problems with the junit task definition, if it was called
>   with -Dmaven.jest.skip=true
> - it was not a runtimetest, but instead it was testing the whole of
>   torque, and therefore should not be in the runtime part of the
>   project but reside in an extra location.
> These problems have been solved with the two suggestions for the new
> test (the functionality and test cases stay the same). They can be
> found if an update is made on the trunks subdirectory of the torque
> svn. There, a new external svn reference called "test" was added for
> the suggestions.
> The first suggestion puts the test into a maven plugin. The plugin can
> be found in the directory test/torque-test-maven-plugin.
> The second suggestion creates a test project for the test, and does
> not need a plugin. It can be found in the directory test/test-project.
> The data needed to test the different databases can be found in the
> test/profile directory. At the moment, only an example for mysql is
> added.
> The directory test/base contains some additional scripts which enable
> one to build all Torque subprojects before the test is started. For
> the second suggestion (test project), this directory could also be
> merged with the test project.
> To try the first suggestion using the maven plugin, change into the
> directory trunks/test/profile/mysql. Adjust the project.properties and
> project.xml to fit your setting. Then, run the command
> maven torque-test:build-run-plugin
> which should install the test plugin and run the test.
> At the moment, the plugin remains installed after the test. I did try
> to uninstall the plugin automatically, but somehow this crashes at the
> next installation of the plugin. I did not try this very hard, no idea
> whether this could be brought to work.
> To try the second suggestion using the test project, change into the
> directory trunks/test/profile/mysql. Adjust the project.xml to contain
> your db driver, put your generator settings into project.properties
> and the runtime settings in Torque.properties. Then, change into the
> directory
> trunks/test/test-project and run the command
> maven -Dtorque.test.profile=mysql torque-test:build-run-project
> These suggestions are not meant as a final stage. Documentation is
> missing, as well as some licence headers, and some formatting issues are
> open.
> I'd like to hear your opinion about which test setup suits you better.
> If you prefer none of the two scenarios but wish to stay with the old
> runtimetest, I'd be interested in ideas how to solve the problems with
> the old runtimetest. If you have problems in trying the suggestions,
> email to the dev list.
>     Thomas

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message