Package org.apache.felix.dm.test.components

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()


        m.add(sp);
        m.add(sc);
        m.add(sequencer);
       
        // Check if the test.annotation components have been initialized orderly
        e.waitForStep(7, 10000);
       
        // Stop the test.annotation bundle
        m.remove(sequencer);
        m.remove(sp);
        m.remove(sp2);
View Full Code Here


        m.remove(sp);
        m.remove(sp2);
        m.remove(sc);
       
        // And check if the test.annotation bundle has been deactivated orderly
        e.waitForStep(11, 10000);
    }
   
    public interface Sequencer
    {
        void step();
View Full Code Here

            .setImplementation(new ServiceAdapter(e));
        m.add(sc);
        m.add(sp);
        m.add(sp2);
        m.add(sa);
        e.waitForStep(5, 15000);
        m.remove(sa);
        m.remove(sp2);
        m.remove(sp);
        m.remove(sc);
    }
View Full Code Here

    public void testAnnotatedAspect() {
        Ensure e = new Ensure();
        // Provide the Sequencer server to the ServiceProvider service
        ServiceRegistration sr1 = register(e, ServiceProvider.ENSURE);
        // Check if the ServiceProvider has been injected in the AspectTest service.
        e.waitForStep(1, 10000);
        // Provide the Sequencer server to the ServiceProviderAspect service
        ServiceRegistration sr2 = register(e, ServiceProviderAspect.ENSURE);
        // Check if the AspectTest has been injected with the aspect
        e.waitForStep(3, 10000);
        // Stop the ServiceProviderAspect service.
View Full Code Here

        // Check if the ServiceProvider has been injected in the AspectTest service.
        e.waitForStep(1, 10000);
        // Provide the Sequencer server to the ServiceProviderAspect service
        ServiceRegistration sr2 = register(e, ServiceProviderAspect.ENSURE);
        // Check if the AspectTest has been injected with the aspect
        e.waitForStep(3, 10000);
        // Stop the ServiceProviderAspect service.
        sr2.unregister();
        // And check if the aspect has been called in its stop/destroy methods.
        e.waitForStep(7, 10000);
        sr1.unregister();
View Full Code Here

        // Check if the AspectTest has been injected with the aspect
        e.waitForStep(3, 10000);
        // Stop the ServiceProviderAspect service.
        sr2.unregister();
        // And check if the aspect has been called in its stop/destroy methods.
        e.waitForStep(7, 10000);
        sr1.unregister();
    }
}
View Full Code Here

                put("test", "temporal");
            }
        };
        Runnable r = Ensure.createRunnableStep(ensure, 1);
        ServiceRegistration sr = context.registerService(Runnable.class.getName(), r, props);
        ensure.waitForStep(1, 15000);
        System.out.println("unregistering R");
        sr.unregister();
        ensure.step(2);
        sleep(500);
        r = Ensure.createRunnableStep(ensure, 3);
View Full Code Here

        sr.unregister();
        ensure.step(2);
        sleep(500);
        r = Ensure.createRunnableStep(ensure, 3);
        sr = context.registerService(Runnable.class.getName(), r, props);
        ensure.waitForStep(3, 15000);
        sr.unregister();
        ensure.step(4);
        sleep(1500);
        ensure.waitForStep(5, 15000);
        ensureReg.unregister();
View Full Code Here

        sr = context.registerService(Runnable.class.getName(), r, props);
        ensure.waitForStep(3, 15000);
        sr.unregister();
        ensure.step(4);
        sleep(1500);
        ensure.waitForStep(5, 15000);
        ensureReg.unregister();
    }
}
View Full Code Here

    @Test
    public void testPropertiesWithTypes() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, Felix4357.ENSURE);
        // wait for S to be started
        e.waitForStep(30, 10000);
        // remove our sequencer: this will stop S
        sr.unregister();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.