Instead of screwing with it, let's re-work the integration tests using Arquillian's managed adapter [1] for Karaf. The integration test would pull down a real Karaf distro zip, unpack it, then allow Arquillian to do its thing. Not only will this be far more stable, but it's more of a "real world" integration test (as opposed to relying on an embedded OSGi container).
[1] https://github.com/arquillian/arquillian-container-osgi/tree/master/container/karaf/managed
|