castor
  1. castor
  2. CASTOR-2650

Execute ddl scripts with cpactf to enable testing against derby-embedded within eclipse

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3.1
    • Component/s: JDO tests
    • Labels:
      None
    • Number of attachments :
      3
    1. patch-C2650-20090505-01.txt
      17 kB
      Ralf Joachim
    2. patch-C2650-20090505-02.txt
      128 kB
      Ralf Joachim
    3. patch-C2650-20090509.txt
      424 kB
      Ralf Joachim

      Issue Links

        Activity

        Hide
        Werner Guttmann added a comment -

        Resolved by using the maven-spl-plugin within the CPACTF POM.

        Show
        Werner Guttmann added a comment - Resolved by using the maven-spl-plugin within the CPACTF POM.
        Hide
        Ralf Joachim added a comment -

        No, this is not resolved by maven-sql-plugin.

        Show
        Ralf Joachim added a comment - No, this is not resolved by maven-sql-plugin.
        Hide
        Werner Guttmann added a comment -

        Oops, sorry, should have read the complete titel of the issue .. .

        Show
        Werner Guttmann added a comment - Oops, sorry, should have read the complete titel of the issue .. .
        Hide
        Ralf Joachim added a comment -

        Initial patch for review.

        • patch-C2650-20090505-01.txt contains changes to pom.xml, framework classes and configuration
        • patch-C2650-20090505-02.txt contains required changes to ddl scripts of derby and mysql

        The patch allows to execute tests with maven against an embedded derby database. In addition test can be executed in eclipse against an embedded derby database or an mysql database server. For mysql it is now only required to setup the database but no scripts need to be executed any more as this is done by the test framework now. The remaining commands to execute against the mysql server prior to test execution are:

        create database cpactf;
        grant all on cpactf.* to 'test'@'localhost' identified by 'test';

        Show
        Ralf Joachim added a comment - Initial patch for review. patch-C2650-20090505-01.txt contains changes to pom.xml, framework classes and configuration patch-C2650-20090505-02.txt contains required changes to ddl scripts of derby and mysql The patch allows to execute tests with maven against an embedded derby database. In addition test can be executed in eclipse against an embedded derby database or an mysql database server. For mysql it is now only required to setup the database but no scripts need to be executed any more as this is done by the test framework now. The remaining commands to execute against the mysql server prior to test execution are: create database cpactf; grant all on cpactf.* to 'test'@'localhost' identified by 'test';
        Hide
        Werner Guttmann added a comment -

        Ralf, I just looked at the code for the first time, and I just wanted to have a few things confirmed:

        a) we are not using SQL scripts anymore ?
        b) DB tables are created using SQL statements created on the fly ?

        Is this correct ?

        Show
        Werner Guttmann added a comment - Ralf, I just looked at the code for the first time, and I just wanted to have a few things confirmed: a) we are not using SQL scripts anymore ? b) DB tables are created using SQL statements created on the fly ? Is this correct ?
        Hide
        Ralf Joachim added a comment -

        Werner, we still need SQL scripts. Disadvantage is that we have to create separate scripts for setup (create table) and teardown (drop table) by hand. Advantage is that we do not need to execute them by hand and we do not need to add any script to pom.xml. We can also execute tests against an embedded derby database in eclipse.

        I only separated the 2 patches for easier review of changes to code and scripts. If you like to test things, you have to apply both patches.

        To get ride of the SQL scripts we will need to extend DDLGEN to be able to specify type and size of columns in mapping. In addition we will need to move definition of default records inserted from scripts to mapping or test cases.

        Show
        Ralf Joachim added a comment - Werner, we still need SQL scripts. Disadvantage is that we have to create separate scripts for setup (create table) and teardown (drop table) by hand. Advantage is that we do not need to execute them by hand and we do not need to add any script to pom.xml. We can also execute tests against an embedded derby database in eclipse. I only separated the 2 patches for easier review of changes to code and scripts. If you like to test things, you have to apply both patches. To get ride of the SQL scripts we will need to extend DDLGEN to be able to specify type and size of columns in mapping. In addition we will need to move definition of default records inserted from scripts to mapping or test cases.
        Hide
        Ralf Joachim added a comment -

        Final patch.

        Show
        Ralf Joachim added a comment - Final patch.

          People

          • Assignee:
            Ralf Joachim
            Reporter:
            Ralf Joachim
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: