On Friday 02 September 2016 10:32:38 Stefan Seifert wrote:
> i've used the teleporter rules in the integration tests for the
> context-aware configs:
> https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/contextawar
> e-config/integration-tests
> 
> on my machines they run smooth on a fast machine, but flaky on a not-so-fast
> machine.
> 
> source of the problem is that the integration tests sometimes start before
> the ResourceResolverFactory service becomes available, it's a racing
> condition.
> 
> in the old HttpTestBase there was a concept with launchpad.ready.1 URLs
> defined which were checked to see if the instances was really ready - is
> there an equivalent concept in the teleporter rule, how to configure it?

To be honest, I see only 2, maybe 3 cases where managing tests over HTTP makes 
sense:

1. you do not want to start your (fat and slow) application under test from 
the tests itself
2. you need a different runner than PaxExam (runners and rules are gone in 
JUnit 5)
3. reuse of tests like done in o.a.s.karaf-launchpad-oak-tar-integration-tests

In any other case I would use Pax Exam and @Inject to ensure required services 
are available before tests are executed.

Regards,
O.

> stefan

Reply via email to