Removing awaitActivation and awaitDeactivation and just retain the future-returning methods as to promote not to block.

This commit is contained in:
Viktor Klang 2012-07-25 20:11:18 +02:00
parent 52e4a18ebe
commit 7ba74434de
10 changed files with 179 additions and 215 deletions

View file

@ -30,16 +30,12 @@ public class ActivationTestBase {
// get a future reference to the activation of the endpoint of the Consumer Actor
FiniteDuration duration = Duration.create(10, SECONDS);
Future<ActorRef> activationFuture = camel.activationFutureFor(producer, duration);
// or, block wait on the activation
camel.awaitActivation(producer, duration);
//#CamelActivation
//#CamelDeactivation
// ..
system.stop(producer);
// get a future reference to the deactivation of the endpoint of the Consumer Actor
Future<ActorRef> deactivationFuture = camel.activationFutureFor(producer, duration);
// or, block wait on the deactivation
camel.awaitDeactivation(producer, duration);
//#CamelDeactivation
system.shutdown();
}