Announcement Announcement Module
No announcement yet.
documentation on the usage of annotations Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • documentation on the usage of annotations

    Hi, I was experimenting spring roo at the moment and got unwanted behaviour when running roo-generated integration test. The data is committed rather than roll back, even though i have tried to add @TransactionConfiguration(defaultRollback=true) and 'extends AbstractTransactionalJUnit4SpringContextTests'. I was wondering if there is anything to do with @RooIntegrationTest. Is there any detailed documentation on the usage of those annotations, for example, @RooIntegrationTest, @RooDataOnDemand and so on.

    Thanks in advance.

  • #2
    Would like some information on this annotation as well.

    The error is

    java.lang.AssertionError: Too expensive to perform a find all test for 'Stock', as there are 1001 entries; set the findAllMaximum to exceed this value or set findAll=false on the integration test annotation to disable the test
    This is how the annotation is declared on the Stock integration test.

    @RooIntegrationTest(entity = Stock.class,findAll=false)
    Not clear what I did wrong there.


    • #3
      The tests run fine when run using "perform tests" on the Roo shell. I guess its a non-issue.


      • #4
        Roo is careful not to execute the "findAll" test unless you have a small number of entities. Otherwise your JPA implementation will use up most or all your memory with attached objects. Roo just skips the test if there's too many, so it's more informational than anything that requires attention. You can turn off Roo's safety feature by using @RooIntegrationTest(findAllMaximum=int).


        • #5
          Is the javadoc the only one documentation available? Isn't somewhere else more friendly documentation, maybe including usage examples?