Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Setting OSGi Framework System Properties during Testing Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting OSGi Framework System Properties during Testing


    I'm trying to set the following property for use by my OSGi integration tests

    I'm using the default Equinox OSGi environment during testing and the only way I've been able to figure out how to set this property is by adding it as a VM arg. This works ok for Maven because I can set it up in Surefire like this

    but then my tests don't work correctly in Eclipse unless I configure a Run Configuration with a VM arg.

    I was curious if its possible to configure some settings file that Equinox will read on start up (I tried putting config.ini on the classpath as a wild guess) or some configuration in AbstractConfigurableBundleCreatorTests?

    I tried setting property (through System.setProperty(...)) in the onSetup method of AbstractConfigurableBundleCreatorTests but I didn't get any results as I think this is too late since Equinox seems to already be started by that point.

    Any help?


  • #2
    Take a look at AbstractConfigurableOsgiTests#createPlatform() method - you can override that to do additional things (such as configuring other properties). Additionally, you can take a look at the sources to see the various hooks one can use during testing.