Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Gyrex » Trying to run integration tests
Trying to run integration tests [message #1729378] Wed, 13 April 2016 13:34 Go to next message
Christian Kaiser is currently offline Christian KaiserFriend
Messages: 2
Registered: April 2016
Junior Member
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 20:50 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

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 07:09 Go to previous message
Christian Kaiser is currently offline Christian KaiserFriend
Messages: 2
Registered: April 2016
Junior Member
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: Thu Apr 25 07:58:59 GMT 2024

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

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

Back to the top