Hello list,

I have a component defined in this way:

/**
* @scr.component label="%repository.name" description="%repository.description" 
name="my.ServerRepository" configurationFactory="true" policy="require"
**/

This component, once installed on felix, doesn't start and the following error 
is shown: "Missing required configuration, cannot activate"
That is fine, no configuration has been provided and the attribute value 
"require" is set.

Running the same bundle into pax, the following test passes:

    @Test
    public void shouldHaveModeshapeServerActive( BundleContext bundleContext ) 
throws Exception {
        Bundle modeshapeServerBundle = getBundle("my.server", 
bundleContext.getBundles());

        assertEquals(Bundle.ACTIVE, modeshapeServerBundle.getState());
    }

So, what I'm thinking is that here I'm testing something different. Probably 
the bundle goes in Active state even if some of its components can't be 
activated. Is this correct?

Now the questions:
1) Is it normal that no message about the activation of the component that is 
failing is shown on the console when running the test? What does felix do here 
that pax (or a wrong configuration) doesn't?
2) In your experience, how would you test the component setup? I'm sure you've 
already done something similar a thousand of times, but for me this is the 
first one

Thanks in advance
Ale


_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to