You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/04/28 17:45:31 UTC

[GitHub] [camel-quarkus] ffang commented on pull request #2524: fix org.apache.camel.quarkus.component.lra.it.LraTest failed #2523

ffang commented on pull request #2524:
URL: https://github.com/apache/camel-quarkus/pull/2524#issuecomment-828651360


   > Asside from the `LraTestResource` mods, I'm a bit confused by the changes to this test.
   > 
   > The general idea is that `CreditService` has a limit of 100 credits. The test then makes 3 'orders' amounting to 95 credits. It then attempts another order with a total of 20 to trigger the 'Insufficient Credit' scenario. So from what I can see, the assertions are valid and correct (I think I stole this idea from the Camel main project BTW).
   
   OK, now I understand better about the testcase.
   
   So the "java.lang.IllegalStateException: Insufficient credit" is expected, but this test still has the logic error.
   Since it always creates new orders before checking the credit, so when checking valid order, the expected return value is 4 instead of 3. I adjusted the camel route definition(put checking credit before creating new order) to make the test pass.
   
   Actually this problem also exists in the test counterpart(LRACreditIT#testCreditExhausted)  of camel-lra component, so I think we also need a change in camel project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org