camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sensen <>
Subject Problem with testng CamelSpringTestSupport: several contexts runs simultaneously
Date Wed, 25 Jul 2012 10:05:21 GMT
we have I problem with the setup and tearDown of the applicationContext
which is managed
by the CamelSpringTestSupport-Class of the testng-package.
When there are several test-methods within several test-classes that extends
a lot of CamelContexts are started, but they are not correctly stopped. So
that while executing
the last test, there are several Contexts running in parallel which results
unpredictable behaviour.

As far as we can see, the reason for this behaviour is:
The applicationContext (and the CamelContext) is created in an
So, by default, for every test-method a context is created and started.
BUT: the context is teared down in the tearDown()-method which is annotated
with @AfterTest.
This method is only executed once at the end of all test.
FIX: we think that the tearDown()-method must not be annotated with
@AfterTest but with

Is this observeration right? Or is there an error in our understanding?

Sincerely Yours,
Norbert Sensen

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message