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

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


       m.add(provider);
       m.add(providerWithHighRank);
       m.add(consumer);
       e.waitForStep(3, 15000);
       m.remove(providerWithHighRank);
       e.step(4);
       e.waitForStep(5, 15000);
       m.remove(provider);
       m.remove(consumer);
       e.waitForStep(6, 15000);
   }
View Full Code Here


       m.add(provider2);
       m.add(consumer);
       e.waitForStep(3, 15000);
       m.add(provider);
       m.remove(provider2);
       e.step(4);
       e.waitForStep(5, 15000);
       m.remove(provider);
       m.remove(consumer);
       e.waitForStep(6, 15000);
   }
View Full Code Here

       m.add(provider2);
       m.add(consumer);
       e.waitForStep(3, 15000);
       m.add(provider);
       m.remove(provider2);
       e.step(4);
       e.waitForStep(5, 15000);
       m.remove(provider);
       m.remove(consumer);
       e.waitForStep(6, 15000);
   }
View Full Code Here

        m.remove(adapter);
        m.remove(provider);
        // that should have triggered step 2
        e.waitForStep(2, 5000);
        // make sure we don't have extra steps by explicitly going to step 3
        e.step(3);
    }
   
    static interface OriginalService {
        public void invoke();
    }
View Full Code Here

        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);
        sr = context.registerService(Runnable.class.getName(), r, props);
        ensure.waitForStep(3, 15000);
        sr.unregister();
View Full Code Here

        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

        // Activate service aspect 3
        ServiceRegistration sa3Sequencer = register(e, ServiceAspect3.ENSURE);
        // Activate service aspect 1
        ServiceRegistration sa1Sequencer = register(e, ServiceAspect1.ENSURE);

        e.step();
        e.waitForStep(6, 10000);

        // Deactivate service provider
        spSequencer.unregister();
        // Make sure that service aspect 1 has been called in ts removed and stop callbacks
View Full Code Here

        m.add(sp);
        m.add(sa2);
        m.add(sa3);
        m.add(sa1);
        e.step();
       
        m.remove(sa3);
        m.remove(sa2);
        m.remove(sa1);
        m.remove(sp);
View Full Code Here

        m.add(sc);
        m.add(asp);       
        m.remove(sc);
        m.remove(sp);
        // ensure we executed all steps inside the component instance
        e.step(4);
    }
   
    static interface ServiceInterface {
        public void invoke();
    }
View Full Code Here

        component.add(dependency2);
        Assert.assertNotNull("service should be available", st.getService());
        component.remove(dependency);
        Assert.assertNotNull("service should be available", st.getService());
       
        e.step(11);
       
        // remove the service again, the component still has an instance bound
        // dependency on it, so stop() should be invoked, but the component
        // should not be destroyed
        m.remove(component2);
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.