Skip to main content



      Home
Home » Archived » Gyrex » Trying to run integration tests
Trying to run integration tests [message #1729378] Wed, 13 April 2016 09:34 Go to next message
Eclipse UserFriend
Hi Guys,

i am trying to run integration tests on a project with GyrexServerResource.
The tests (and the app) are a legacy code.

The problem is that the ApplicationManager is not available.

Here my finding while debugging.

- The application manager should be taken from a custom bundle.
- The custom bundle is available during runtime of the tests.
- The application manager should be bound to the custom bundle on startup: it works on actual server start, but not in test environment.
- The application manager is bound correctly to other components in the test environment.

I dont know where to start to dig and would be glad to get any hint from you.
Thanks,
Christian




Re: Trying to run integration tests [message #1729402 is a reply to message #1729378] Wed, 13 April 2016 16:50 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

It sounds to me like an issue with bundle activation, potentially ordering. Keep in mind that the test bundle and all it's dependencies are activated first. Then the JUnit rule is triggered and the server is started. This is different from regular startup when the server is activated before the other bundles.

Can you check if the service is dynamic, i.e. updating to changes in the service registry as the other service becomes available?

Also, I would try launching the tests with -console and then debug bundle activation/resolution status from within. You should set a breakpoint or instruct Equinox to not exit in case of errors. That's also very handy if you are troubleshooting resolution errors.

-Gunnar
Re: Trying to run integration tests [message #1729433 is a reply to message #1729402] Thu, 14 April 2016 03:09 Go to previous message
Eclipse UserFriend
Hi Gunnar,

thanks for your quick response.
Yes, also my test bundle does not consume the configured services.
Lets see what the osgi console says...
Bye,
Christian
Previous Topic:http service in gyrex cluster
Next Topic:osgi.ee filter
Goto Forum:
  


Current Time: Mon May 05 18:23:13 EDT 2025

Powered by FUDForum. Page generated in 0.04638 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top