use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class MethodSignaturesTest method testFactoryPidUpdatedSignature1.
/**
* Validates FactoryConfigurationAdapter updated callback signatures.
*/
public void testFactoryPidUpdatedSignature1() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, MethodSignatures.ENSURE_FACTORYPID);
e.waitForStep(3, 5000);
sr.unregister();
// make sure configurations are deleted
e.waitForStep(6, 5000);
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class MultipleAnnotationsTest method testMultipleAnnotations.
public void testMultipleAnnotations() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, MultipleAnnotations.ENSURE);
e.waitForStep(7, 10000);
sr.unregister();
e.waitForStep(11, 10000);
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class OptionalConfigurationTest method testOptionalConfig.
public void testOptionalConfig() throws Throwable {
Ensure e = new Ensure();
ServiceRegistration ensureConsumer = register(e, OptionalConfiguration.ENSURE_CONF_CONSUMER);
// consumer called in updated with testKey="default" config, and then called in start
e.waitForStep(1, 5000);
// will register a "testKey=testvalue" configuration, using config admin.
ServiceRegistration ensureConfCreator = register(e, OptionalConfiguration.ENSURE_CONF_CREATOR);
// consumer called in updated with testKey="testvalue"
e.waitForStep(2, 5000);
// remove configuration.
ensureConfCreator.unregister();
// consumer called in updated with default "testkey=default" property (using the default method from the config interface.
e.waitForStep(3, 5000);
// stop the OptionalConfigurationConsumer component
ensureConsumer.unregister();
// consumer stopped
e.waitForStep(4, 5000);
e.ensure();
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class PropagateAnnotationTest method testServiceDependencyPropagate.
public void testServiceDependencyPropagate() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, PropagateAnnotation.ENSURE);
e.waitForStep(3, 10000);
sr.unregister();
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class ProviderSwappedByAspectTest method testAnnotatedAspect.
public void testAnnotatedAspect() {
Ensure e = new Ensure();
ServiceRegistration consumer = register(e, ProviderSwappedByAspect.Consumer.ENSURE);
ServiceRegistration provider = register(e, ProviderSwappedByAspect.Provider.ENSURE);
// client bound to provider (1), and client calls provider (2)
e.waitForStep(2, 5000);
ServiceRegistration aspect = register(e, ProviderSwappedByAspect.ProviderAspect.ENSURE);
// provider swapped with aspect (3), aspect called (4), original provider called (5)
e.waitForStep(5, 5000);
aspect.unregister();
// aspect swapped by provider (6), provider called (7)
e.waitForStep(7, 5000);
provider.unregister();
// provider unbound (8), provider called (9)
e.waitForStep(9, 5000);
consumer.unregister();
}
Aggregations