[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] Virgo test framework - @BundleDependencies question

Hi Dmitry

I haven't noticed this annotation, so thanks for bringing it up for discussion!

Presumably the annotation adds the bundles to the user region, so is more akin to the user region properties. Right? (If so, I then wonder whether it's closer to baseBundles which need to be transitively complete and are installed early in the user region or initialArtifacts which are deployed through the deployer interface relatively late, but before recovery, hot deployment etc. get going. We should work this out if/when we document the test framework...)

The flag is more maintainable IMO and therefore preferable.

I wonder if the default value of the flag should be true, as it's by far the most common case and is harmless for bundles that don't need starting.

Finally, is "BundleEnty" a typo?

Regards,
Glyn

On 20 Dec 2010, at 17:00, Dmitry Sklyut wrote:

> Hi,
> 
> BundleDependencies annotation can be used to specify extra bundles needed by the specific test case.
> This is cleaner than specifying all entries in the test.config.properties or in org.eclipse.virgo.kernel.userregion.properties.
> 
> One thing that is missing - code in OsgiTestRunner.addUserConfiguredBundles does not account for "auto-start" setting.
> That is, adding "@start" at the end of the uri.
> 
> The change is trivial, but I wonder if the BundleDependencies annotation should be changed to provide a flag to auto-start to match
> org.eclipse.virgo.osgi.launcher.parser.BundleEntry.
> 
> With this change BundleDependencies can be changed like this:
> 
> <code>
> 
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.TYPE)
> public @interface BundleDependencies {
> 
> 	BundleEnty[] value();
> }
> 
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.TYPE)
> public @interface BundleEnty { 
> 
>     String value();
>     boolean autoStart() default false;
> }
> </code>
> 
> So the choice is between a flag and parsing of the uri to look for "@start" at the end of the location string.
> 
> Thoughts?
> 
> Regards,
> Dmitry
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/virgo-dev