Problem with ConfigurationAdminAssert

13 views
Skip to first unread message

Cristiano Gavião

unread,
Aug 14, 2014, 2:53:50 PM8/14/14
to knowhowlab-...@googlegroups.com
Hello,

While testing a Factory PID I found a possible bug in the method below or with pax-exam4.1. at least when running debug with pax-exam and Equinox-Luna (where I could debug) I'm getting a different behaviour than expected.

 
public static void assertConfigurationAvailable(String message, BundleContext bc, String pid, String factoryPid) {
        assertConfigurationAvailable
(message, bc, createConfigurationFilter(pid, factoryPid, bc.getBundle().getLocation()));
   
}



I need to ensure that a factory configuration was added and later to ensure that one service was created for this configuration (DS with Required configuration policy).

I'm using the method this way : ConfigurationAdminAssert.assertConfigurationAvailable(bc, null,"servicefactory1");
It fails and what I saw while debugging is that the filter created by the method is this:

(&(service.factoryPid=servicefactory1)(service.bundleLocation=local))


if I remove (service.bundleLocation=local)  from filter, the factory configuration is found and test pass...

any one have tried this with pax-exam ?

Dmytro Pishchukhin

unread,
Aug 15, 2014, 5:08:29 AM8/15/14
to knowhowlab-...@googlegroups.com
Hi Cristiano,

can you reproduce the problem with another pax-exam or equinox version?
Reply all
Reply to author
Forward
0 new messages