On Wednesday 10 August 2016 19:42:52 Benson Margulies wrote:
> For one of my tests, pax-exam-cm looks great. Do I include felix
> config admin with it or not?

Not sure if I understand your question, but you have to provide Metatype 
Service and Configuration Admin Service when using Felix DS/SCR.

See which dependencies SlingOptions#scr() pulls in.

> For another, I need each test method to have different configuration,
> so I'd have to make multiple test classes, no?

I haven't tried, but if it's possible to know the test method which will be 
called after configuration (assuming running with PerMethod) you can do 
something like this in configuration:

when("test_a".equals(test)).useOptions(
    newConfiguration(...).asOption()
)

If it's not possible I would not call ConfigurationAdmin myself however (but 
use separate test classes). You have to deal with its asynchronous behavior 
and you see lots of tests in the wild doing Thread.sleep(...) after creating 
or updating configurations.

Regards,
O.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to