On Tuesday, October 25, 2016 at 11:03:35 AM UTC-7, Achim Nierbeck wrote:
>
> Hi David, 
>
> this sounds a bit strange.
>

Oh.  And now I see that I didn't fully grok what one statement in the doc 
was saying.

The PaxExam doc clearly states this (with my emphasis):

>           The test class may contain one or more methods annotated by 
> @Configuration, returning a list of options for configuring the test 
> container. 
>
> If there is more than one configuration method, *each test method is run 
> for each configuration*. 
>
>  I definitely noticed the "one or more methods" statement before, but I 
never fully absorbed the second sentence, which now that I'm fully reading 
it, I see that it works very differently than I thought. I guess I'll have 
to do something similar to what you showed.

For the Pax-Web Pax-Exam integration tests we're using a base class which 
> does some 
> basic configuration which is called by the annotated config method. 
> For example this test [1] calls the specific configuration method [2]
>
> regards, Achim 
>
> [1] - 
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty/HttpServiceIntegrationTest.java#L70-L73
> [2] - 
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty/ITestBase.java#L59
>
> 2016-10-25 18:47 GMT+02:00 David Karr <davidmic...@gmail.com <javascript:>
> >:
>
>> I'm looking at a codebase with a bunch of PaxExam-based integration 
>> tests.  They all have separate "config" methods annotated with 
>> "@Configuration". All of these methods are almost identical, all specifying 
>> several identical options. They only vary in the "features()" value.
>>
>> I believe that PaxExam will look for ALL the methods annotated with 
>> "@Configuration" and use the options provided there.  The real question is, 
>> how does it merge those results, and what would it do with methods in a 
>> base class with this annotation?
>>
>> The critical question is whether it will intelligently deal with options 
>> that set the same property, but with different values.  If the two 
>> annotated methods are in the same class, I wouldn't assume any priority, as 
>> there's no logical answer to that.  However, if one method is in the base 
>> class and the other is in the subclass, logic says that the options set in 
>> the subclass would override the settings in the base class.
>>
>> I haven't seen any documentation that states how this would work.  Is 
>> there any specification of this?
>>
>> -- 
>> -- 
>> ------------------
>> OPS4J - http://www.ops4j.org - op...@googlegroups.com <javascript:>
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ops4j+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & 
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master 
>
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to