// Check if the test is aware whether or not it can control the broker life cycle, and if so provide
// additional instrumentation for it to control the in-vm broker through.
if (test instanceof BrokerLifecycleAware)
{
BrokerLifecycleAware inVMTest = (BrokerLifecycleAware) test;
inVMTest.setInVmBrokers();
inVMTest.setLiveBroker(1);
inVMTest.setFailureMechanism(new CauseFailureInVM(inVMTest));
}
}
}
// Run the test.