// Wait for the processing of the first configuration.
grace();
// The instance should be created, wait for the architecture service
osgiHelper.waitForService(Architecture.class.getName(), "(architecture.instance=" + pid + ")", 1000);
Architecture architecture = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + pid + ")");
assertEquals("Check object", 1, ((PrimitiveInstanceDescription) architecture.getInstanceDescription()).getCreatedObjects().length);
FooService fs = (FooService) osgiHelper.getServiceObject(FooService.class.getName(), "(instance.name=" + pid + ")");
Properties p = fs.fooProps();
String mes = p.getProperty("message");
int count = (Integer) p.get("count");
//architecture = (Architecture) osgiHelper.getServiceObject( Architecture.class.getName(), "(architecture.instance="+pid+")");
assertEquals("Assert Message", "message", mes);
assertEquals("Assert count", 1, count);
assertEquals("Check 1 object", 1, ((PrimitiveInstanceDescription) architecture.getInstanceDescription()).getCreatedObjects().length);
props.put("message", "message2");
try {
configuration.update(props);
// Update the configuration ...
grace();
} catch (Exception e) {
fail(e.getMessage());
}
fs = (FooService) osgiHelper.getServiceObject(FooService.class.getName(), "(instance.name=" + pid + ")");
p = fs.fooProps();
mes = p.getProperty("message");
count = (Integer) p.get("count");
//architecture = (Architecture) osgiHelper.getServiceObject( Architecture.class.getName(), "(architecture.instance="+pid+")");
assertEquals("Assert Message", "message2", mes);
assertEquals("Assert count", 2, count);
assertEquals("Check 1 object", 1, ((PrimitiveInstanceDescription) architecture.getInstanceDescription()).getCreatedObjects().length);
try {
configuration.delete();
grace();
} catch (Exception e) {