Re: testing helper

2014-08-21 Thread Davide Giannella
On 20/08/2014 10:11, Marcel Reutegger wrote:
 oops, you are right, that would be a bad idea. I thought this is about
 a production class and not a test utility.
I can see an additional bundle like testing-commons that can be
imported with scope test by other projects.

The pain point in here is that the testing helpers: functions, classes,
etc; uses part of the oak-core api (NodeBuilder, NodeState, etc) and
without having the exposed API as a bundle but together with the
implementation we go in a loop of having oak-core depending on
testing-commons and testing-commons depending on oak-core.

D.





Re: testing helper

2014-08-21 Thread Chetan Mehrotra
Probably we can package the test classes as an attached artifact and
make use of that. For example oak-lucene uses the Oak Core test via

dependency
  groupIdorg.apache.jackrabbit/groupId
  artifactIdoak-core/artifactId
  version${project.version}/version
  classifiertests/classifier
  scopetest/scope
/dependency
Chetan Mehrotra


On Thu, Aug 21, 2014 at 1:36 PM, Davide Giannella dav...@apache.org wrote:
 On 20/08/2014 10:11, Marcel Reutegger wrote:
 oops, you are right, that would be a bad idea. I thought this is about
 a production class and not a test utility.
 I can see an additional bundle like testing-commons that can be
 imported with scope test by other projects.

 The pain point in here is that the testing helpers: functions, classes,
 etc; uses part of the oak-core api (NodeBuilder, NodeState, etc) and
 without having the exposed API as a bundle but together with the
 implementation we go in a loop of having oak-core depending on
 testing-commons and testing-commons depending on oak-core.

 D.





Re: testing helper

2014-08-21 Thread Michael Dürig



On 21.8.14 10:21 , Chetan Mehrotra wrote:

Probably we can package the test classes as an attached artifact and
make use of that. For example oak-lucene uses the Oak Core test via

dependency
   groupIdorg.apache.jackrabbit/groupId
   artifactIdoak-core/artifactId
   version${project.version}/version
   classifiertests/classifier
   scopetest/scope
 /dependency


+1. I think we did that elsewhere in the past.

Michael


Chetan Mehrotra


On Thu, Aug 21, 2014 at 1:36 PM, Davide Giannella dav...@apache.org wrote:

On 20/08/2014 10:11, Marcel Reutegger wrote:

oops, you are right, that would be a bad idea. I thought this is about
a production class and not a test utility.

I can see an additional bundle like testing-commons that can be
imported with scope test by other projects.

The pain point in here is that the testing helpers: functions, classes,
etc; uses part of the oak-core api (NodeBuilder, NodeState, etc) and
without having the exposed API as a bundle but together with the
implementation we go in a loop of having oak-core depending on
testing-commons and testing-commons depending on oak-core.

D.





Re: testing helper

2014-08-21 Thread Felix Meschberger
That’s exactly what I had in mind :-)

Regards
Felix

Am 21.08.2014 um 10:21 schrieb Chetan Mehrotra chetan.mehro...@gmail.com:

 Probably we can package the test classes as an attached artifact and
 make use of that. For example oak-lucene uses the Oak Core test via
 
 dependency
  groupIdorg.apache.jackrabbit/groupId
  artifactIdoak-core/artifactId
  version${project.version}/version
  classifiertests/classifier
  scopetest/scope
/dependency
 Chetan Mehrotra
 
 
 On Thu, Aug 21, 2014 at 1:36 PM, Davide Giannella dav...@apache.org wrote:
 On 20/08/2014 10:11, Marcel Reutegger wrote:
 oops, you are right, that would be a bad idea. I thought this is about
 a production class and not a test utility.
 I can see an additional bundle like testing-commons that can be
 imported with scope test by other projects.
 
 The pain point in here is that the testing helpers: functions, classes,
 etc; uses part of the oak-core api (NodeBuilder, NodeState, etc) and
 without having the exposed API as a bundle but together with the
 implementation we go in a loop of having oak-core depending on
 testing-commons and testing-commons depending on oak-core.
 
 D.
 
 
 



Re: testing helper

2014-08-21 Thread Davide Giannella
On 21/08/2014 09:26, Michael Dürig wrote:


 On 21.8.14 10:21 , Chetan Mehrotra wrote:
 Probably we can package the test classes as an attached artifact and
 make use of that. For example oak-lucene uses the Oak Core test via

 dependency
groupIdorg.apache.jackrabbit/groupId
artifactIdoak-core/artifactId
version${project.version}/version
classifiertests/classifier
scopetest/scope
  /dependency

 +1. I think we did that elsewhere in the past.
For not loosing track of it https://issues.apache.org/jira/browse/OAK-2046

D.




Re: testing helper

2014-08-20 Thread Marcel Reutegger
Hi,

oak-commons might be a good fit...

regards
 marcel

On 19/08/14 09:17, Davide Giannella dav...@apache.org wrote:

Hello team,

as part of OAK-2035 I had to copy some helpers from oak-core to
oak-jcr. I was in a hurry so I copied
oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/util/ValuePathTuple.ja
va
and some functions I pasted in OrderedIndexIT.java.

Now I was thinking what would be a proper way to share, for testing
only, some classes/methods across multiple projects: in the case above
oak-core and oak-jcr?

Cheers
Davide





Re: testing helper

2014-08-20 Thread Felix Meschberger
Hi

Am 20.08.2014 um 09:43 schrieb Marcel Reutegger mreut...@adobe.com:

 Hi,
 
 oak-commons might be a good fit…

In the test artifact attachment ?

I would suggest not to add test classes to the primary artifact.

Regards
Felix

 
 regards
 marcel
 
 On 19/08/14 09:17, Davide Giannella dav...@apache.org wrote:
 
 Hello team,
 
 as part of OAK-2035 I had to copy some helpers from oak-core to
 oak-jcr. I was in a hurry so I copied
 oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/util/ValuePathTuple.ja
 va
 and some functions I pasted in OrderedIndexIT.java.
 
 Now I was thinking what would be a proper way to share, for testing
 only, some classes/methods across multiple projects: in the case above
 oak-core and oak-jcr?
 
 Cheers
 Davide
 
 
 



Re: testing helper

2014-08-20 Thread Marcel Reutegger
Hi,

On 20/08/14 10:23, Felix Meschberger fmesc...@adobe.com wrote:

Am 20.08.2014 um 09:43 schrieb Marcel Reutegger mreut...@adobe.com:

 Hi,
 
 oak-commons might be a good fitŠ

In the test artifact attachment ?

I would suggest not to add test classes to the primary artifact.

oops, you are right, that would be a bad idea. I thought this
is about a production class and not a test utility.

regards
 marcel




testing helper

2014-08-19 Thread Davide Giannella
Hello team,

as part of OAK-2035 I had to copy some helpers from oak-core to
oak-jcr. I was in a hurry so I copied 
oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/util/ValuePathTuple.java
and some functions I pasted in OrderedIndexIT.java.

Now I was thinking what would be a proper way to share, for testing
only, some classes/methods across multiple projects: in the case above
oak-core and oak-jcr?

Cheers
Davide