[ 
https://issues.apache.org/jira/browse/CAMEL-21452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Otavio Rodolfo Piske updated CAMEL-21452:
-----------------------------------------
    Estimated Complexity:   (was: Unknown)

> camel-test-infra: decouple the infrastructure from the testing API
> ------------------------------------------------------------------
>
>                 Key: CAMEL-21452
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21452
>             Project: Camel
>          Issue Type: Task
>          Components: camel-test-infra
>            Reporter: Otavio Rodolfo Piske
>            Priority: Major
>
> It turns out that the test infrastructure management code on the test-infra 
> could be useful in multiple other scenarios (i.e.: for Camel JBang). However, 
> there's a small set of classes that are bound to the test API used by Camel. 
> These APIs would make re-purposing the test infra harder and inelegant for 
> users of that code. 
> It should be relatively simple to decouple this API (high-level steps, 
> details may vary slightly):
> 1. Split 
> {{{color:#000000}org.apache.camel.test.infra.common.services{color}.TestService}}
>  in 2 parts: one named {{InfrastructureService}} for the infrastructure code 
> (containing {{{}registerProperties{}}}, {{{}initialize{}}}, {{shutdown}} and 
> {{{}close{}}}) and another retaining the {{TestService}} name (containing the 
> {{beforeAll}} and {{afterAll}} callbacks from JUnit's 
> {{{}BeforeAllCallback{}}}, {color:#000000}{{AfterAllCallback}} 
> interfaces){color}
> {color:#000000}2. Rename the existing {{<Name>Service}} to 
> {{<Name>TestService}} (i.e.: {{{}ElasticSearchTestService{}}}) and make sure 
> it implements the {{TestService}} API{color}
> {color:#000000}3. Create a new <Name>Service and make sure it DOES NOT 
> implement the {{TestService}} API
> {color}
> {color:#000000}4. Move the infrastructure code to {{src/main}}{color}
> {color:#000000}5. Keep the Camel-specific test infra code (i.e.:  
> <Name>TestService) within {{src/test}}{color}
>  
> Repeat for all services in the test-infra.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to