Results 1 to 4 of 4

Thread: Trouble with Integration Tests for concrete subtypes of abstract types

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    2

    Question Trouble with Integration Tests for concrete subtypes of abstract types

    Hey,

    I'm new to Spring Roo and very impressed of whats all possible with it.

    But i've a problem with the creation of Integration Tests.

    If i create an AbstractType and an concrete Subtype of it, for which I use --testAutomatically, Roo generates erroneous java-code.

    Simply this problem can be produced with the following roo-commands:
    (I've run them in the Sprint Source Tool Suite)

    // Spring Roo 1.1.3.RELEASE [rev 4404ffb] log opened at 2011-05-12 18:59:28
    project --topLevelPackage test --projectName RooTest --java 6
    persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
    entity --class ~.AbstractType --abstract
    entity --class ~.ConcreteType --extends test.AbstractType --testAutomatically

    Roo creates a wrong "ConcreteClassDataOnDemand_Roo_DataOnDemand",
    where it uses the AbstractType instead of the ConcreteType, so that there are
    some java errors that prevent from running it.

    Chaning the occurences of AbstractType with ConcreteType will fix the problem and the test passes but due it's generated code, roo will overwrite it at any changes...

    Is this a real bug of roo, or does anyone has a solution for this?
    Thanks!

  2. #2
    Join Date
    May 2011
    Posts
    2

    Default Re: Trouble with Integration Tests for concrete subtypes of abstract types

    I also have this same issue. I checked the issue tracker and found https://jira.springsource.org/browse/ROO-2357 which addresses this issue. It looks like it is (was?) an regression bug introduced in 1.1.3 and is reported to be fixed in 1.1.4. I about to get the latest snapshot and let you know if that fixes the problem.

    Mr. Bill

  3. #3
    Join Date
    May 2011
    Posts
    2

    Default Re: Trouble with Integration Tests for concrete subtypes of abstract types

    yep, the latest 1.1.4 snapshot fixes this issue. yipee!

    Mr. Bill

  4. #4
    Join Date
    May 2011
    Posts
    2

    Default

    Thats fine, so only thing to do is to wait for the release of 1.1.4 (or use the snapshot).
    Thans for your help!

    Soenke

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •