Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JcloudsClientProvider is required in runtime by modelreader. #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrian-rosello
Copy link
Member

model-reader feature depends on the openstack one. So, whenever the model-reader feature is started inside a karaf container, the openstack feature gets started as well.

Since model-reader-itest project did not have any dependency to jclouds-client-provider, mvn decided there's no problem to compile it before the jclouds-client-provider bundle. Here is the compilation order.

09-Jul-2015 13:59:40 [INFO] Reactor Summary:
09-Jul-2015 13:59:40 [INFO] .....
......................................................................
09-Jul-2015 13:59:40 [INFO] MQNaaS :: OpenStack ................................ SUCCESS [ 0.122 s]
09-Jul-2015 13:59:40 [INFO] MQNaaS :: OpenStack API ............................ SUCCESS [ 2.297 s]
09-Jul-2015 13:59:40 [INFO] MQNaaS :: Generic Resource Model Reader ............ SUCCESS [ 0.089 s]
09-Jul-2015 13:59:40 [INFO] MQNaaS :: Generic Model Reader ..................... SUCCESS [ 4.701 s]
09-Jul-2015 13:59:40 [INFO] MQNaaS :: ModelReader Integration Tests ............ FAILURE [01:14 min]
09-Jul-2015 13:59:40 [INFO] MQNaaS :: JClouds Client Provider .................. SKIPPED
09-Jul-2015 13:59:40 [INFO] MQNaaS :: OpenStack Implementation ................. SKIPPED

So, if you have a clean m2 repository, model-reader-integration test will try to start the model-reader feature, but it won't find all required bundles in m2 (model-reader -> openstack -> jclodusClientProvider, which is the one producing the error).

With this patch, we assure the jclouds-client-provider is compiled first.

…s fix we assure it's compiled before the integration tests of modelreader.
@adrian-rosello
Copy link
Member Author

I think it's not the best solution, since it forces the Openstack implementation to use jclouds. But I don't see any other way. Suggestions are more than welcome :)

@isartcanyameres
Copy link
Member

Hi, I've been struggling my brain a little.
I'm wondering if the following would also solve the problem but reduce the coupling, too:
Could we force "only" model-reader-itest to depend on jclouds-client-provider at runtime?

This way we tell the test to "use" an implementation, but we don't bind modelreader with jclouds :)

@isartcanyameres
Copy link
Member

An alternative solution would be to instruct maven to run all itests only when all projects have already been build and installed in the local repo.
But honestly, I'm not aware of the mechanism to do so, or even if there is such thing in maven :S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants