[ 
https://issues.apache.org/jira/browse/FELIX-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14703599#comment-14703599
 ] 

Thomas Watson commented on FELIX-4987:
--------------------------------------

To run the Equinox tests you need 4 projects (which are located across 3 
repositories).  First clone the following repositories:

git clone http://git.eclipse.org/gitroot/equinox/rt.equinox.framework.git
git clone http://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git
git clone http://git.eclipse.org/gitroot/platform/eclipse.platform.releng.git

rt.equinox.framework.git contains the framework implementation.  I created a 
branch there called twatson/newResolver that should have the latest felix 
resolver source.

Then import the following 4 projects into Eclipse (hope you don't mind using 
Eclipse):

rt.equinox.framework\bundles\org.eclipse.osgi - contains the framework 
implementation
rt.equinox.framework\bundles\org.eclipse.osgi.tests - contains the tests
eclipse.platform.runtime\tests\org.eclipse.core.tests.harness - harness for the 
tests
eclipse.platform.releng\bundles\org.eclipse.test.performance - something the 
harness needs

Once you have these 4 projects imported into Eclipse.  Then the easiest way to 
run all the tests is to use the Run->Run Configurations... menu to bring up the 
Run Configurations dialog.  There should be a predefined launch configuration 
under "JUnit Plug-in Tests" called "All OSGi Tests".  Run that.

This will run all the framework tests.  The important test suite to pay 
attention to is org.eclipse.osgi.tests.container.TestModuleContainer.  That 
suite has 3 failures with tests that start with testDynamicImport.  If you want 
you can run only the org.eclipse.osgi.tests.container.TestModuleContainer by 
modifying the "All OSGi Tests" launch config to use that class.

Dynamic resolution can lead to fragments being attached to new hosts.  I added 
a new test just now that tests that directly.  If you run the 
TestModuleContainer tests with the master branch they all pass.  With the 
twatson/newResolver branch 4 testDynamicImport tests fail.

> Dynamic package resolution with unresolvable or fragment package exports can 
> lead to invalid wirings
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-4987
>                 URL: https://issues.apache.org/jira/browse/FELIX-4987
>             Project: Felix
>          Issue Type: Bug
>          Components: Resolver
>         Environment: All
>            Reporter: Thomas Watson
>
> With the latest code in trunk calling 
> org.apache.felix.resolver.ResolverImpl.resolve(ResolveContext, Resource, 
> Requirement, List<Capability>) with a List<Capability> containing a 
> Capability from a fragment will lead to an invalid Wire.
> This looks similar to FELIX-4897 and appears to be a regression.
> There are two types of failures.
> 1) Where the fragment has a valid host to resolve against.  In this case I 
> would expect the Wire.getProvider() to be the host revision for the fragment, 
> but the current code returns the fragment revision
> 2) Where the fragment has no valid host available.  In this case I would 
> expect no Wire to be returned in the result from the ResolverImpl.resolve 
> call.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to