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

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


              .setService(ServiceInterface.class)
              .setRequired(true)
              .setCallbacks("add", "remove"));
       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);
View Full Code Here


       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(provider2);
       e.step(4);
       e.waitForStep(5, 15000);
       m.remove(provider);
       m.remove(consumer);
       e.waitForStep(6, 15000);
   }

   static interface ServiceInterface {
       public void invoke();
   }
View Full Code Here

            .add(m.createServiceDependency().setService(ServiceInterface2.class).setRequired(true))
            ;
       
        // register both producers, validate that both services are started
        m.add(sp1);
        e.waitForStep(1, 2000);
        m.add(sp2);
        e.waitForStep(2, 2000);
       
        // add both aspects, and validate that both instances have been created
        m.add(a1);
View Full Code Here

       
        // register both producers, validate that both services are started
        m.add(sp1);
        e.waitForStep(1, 2000);
        m.add(sp2);
        e.waitForStep(2, 2000);
       
        // add both aspects, and validate that both instances have been created
        m.add(a1);
        m.add(a2);
        e.waitForStep(4, 4000);
View Full Code Here

        e.waitForStep(2, 2000);
       
        // add both aspects, and validate that both instances have been created
        m.add(a1);
        m.add(a2);
        e.waitForStep(4, 4000);
       
        // add the client, which will automatically invoke both services
        m.add(sc);
       
        // wait until both services have been invoked
View Full Code Here

       
        // add the client, which will automatically invoke both services
        m.add(sc);
       
        // wait until both services have been invoked
        e.waitForStep(6, 4000);
       
        // make sure the proxy has been called twice
        Assert.assertEquals("Proxy should have been invoked this many times.", 2, DynamicProxyHandler.getCounter());
       
        m.remove(sc);
View Full Code Here

        // note that we can provide an actual implementation instance here because there will be only one
        // adapter, normally you'd want to specify a Class here
        m.add(m.createResourceAdapterService("(&(path=/path/to/*.txt)(host=localhost))", false, null, "changed")
              .setImplementation(new ResourceAdapter(e)));
        // wait until the single resource is available
        e.waitForStep(3, 5000);
        // trigger a 'change' in our resource
        provider.change();
        // wait until the changed callback is invoked
        e.waitForStep(4, 5000);
        m.clear();
View Full Code Here

        // we first start the provider, the adapter and the consumer
        m.add(provider);
        m.add(adapter);
        m.add(consumer);
        // now wait until the callback method is invoked on the consumer
        e.waitForStep(1, 5000);
        // now we add an aspect on top of the provided service, which
        // should not affect our consumer at all
        m.add(aspect);
        m.remove(aspect);
        // now we remove the consumer, adapter and provider
View Full Code Here

        // now we remove the consumer, adapter and provider
        m.remove(consumer);
        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 {
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.