You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Timothee Maret <tm...@apache.org> on 2017/01/20 14:47:16 UTC

Integration tests with specific Oak backend

Hi,

I would like to add an integration test that covers SCD binary less feature
(Use Binary References) in a specific setup:

          Two instances with shared caching blob store (AFAIK any blob
store that implements [0] such as [1]).

I wonder two things

1. Is it fine to run integration tests using FileDataStores (rather than
the potentially much faster memory based data stores) ?
2. Would it make sense to complete the
org.apache.sling.testing.sling-mock-oak in order to allow specifying what
backend configuration to use ?

Regards,

Timothee

[0] org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore
[1] org.apache.jackrabbit.oak.plugins.blob.datastore.CachingFileDataStore

Re: Integration tests with specific Oak backend

Posted by Timothée Maret <ti...@gmail.com>.
Hi Oliver,

2017-01-23 15:58 GMT+01:00 Oliver Lietz <ap...@oliverlietz.de>:

> On Monday 23 January 2017 15:33:58 Timothee Maret wrote:
> > Hi,
> >
> > 2017-01-20 18:15 GMT+01:00 Oliver Lietz <ap...@oliverlietz.de>:
> > > On Friday 20 January 2017 15:47:16 Timothee Maret wrote:
> > > > Hi,
> > >
> > > Hi,
> > >
> > > > I would like to add an integration test that covers SCD binary less
> > >
> > > feature
> > >
> > > > (Use Binary References) in a specific setup:
> > > >           Two instances with shared caching blob store (AFAIK any
> blob
> > > >
> > > > store that implements [0] such as [1]).
> > > >
> > > > I wonder two things
> > > >
> > > > 1. Is it fine to run integration tests using FileDataStores (rather
> than
> > > > the potentially much faster memory based data stores) ?
> > >
> > > Oak Server, Scripting Thymeleaf and FreeMarker use "real" Sling
> instances
> > > with
> > > SegmentNodeStore already and Sling Karaf a DocumentNodeStore with Mongo
> > > also –
> > > so it should be fine. See Michael's comment in OAK-4862 and be careful
> > > when
> > > using mocks and MemoryNodeStore.
> >
> > Thanks for the pointers!
> >
> > > > 2. Would it make sense to complete the
> > > > org.apache.sling.testing.sling-mock-oak in order to allow specifying
> > >
> > > what
> > >
> > > > backend configuration to use ?
> > >
> > > Is it then still a mock?
> >
> > I thought this was debatable. I assume the consensus is to not provide
> > realistic mocks, and only setup specific backend if really needed.
>
> Completing sling-mock-oak makes sense indeed as there are already "mocks"
> based on real repositories.
>

+1 I have opened SLING-6483 to track this.

Regards,

Timothee



>
> O.
>
> >
> > Regards,
> >
> > Timothee
> >
> > > Regards,
> > > O.
> > >
> > > > Regards,
> > > >
> > > > Timothee
> > > >
> > > > [0] org.apache.jackrabbit.oak.plugins.blob.
> > >
> > > AbstractSharedCachingDataStore
> > >
> > > > [1] org.apache.jackrabbit.oak.plugins.blob.datastore.
> > >
> > > CachingFileDataStore
>
>


-- 
Timothée Maret

Re: Integration tests with specific Oak backend

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Monday 23 January 2017 15:33:58 Timothee Maret wrote:
> Hi,
> 
> 2017-01-20 18:15 GMT+01:00 Oliver Lietz <ap...@oliverlietz.de>:
> > On Friday 20 January 2017 15:47:16 Timothee Maret wrote:
> > > Hi,
> > 
> > Hi,
> > 
> > > I would like to add an integration test that covers SCD binary less
> > 
> > feature
> > 
> > > (Use Binary References) in a specific setup:
> > >           Two instances with shared caching blob store (AFAIK any blob
> > > 
> > > store that implements [0] such as [1]).
> > > 
> > > I wonder two things
> > > 
> > > 1. Is it fine to run integration tests using FileDataStores (rather than
> > > the potentially much faster memory based data stores) ?
> > 
> > Oak Server, Scripting Thymeleaf and FreeMarker use "real" Sling instances
> > with
> > SegmentNodeStore already and Sling Karaf a DocumentNodeStore with Mongo
> > also –
> > so it should be fine. See Michael's comment in OAK-4862 and be careful
> > when
> > using mocks and MemoryNodeStore.
> 
> Thanks for the pointers!
> 
> > > 2. Would it make sense to complete the
> > > org.apache.sling.testing.sling-mock-oak in order to allow specifying
> > 
> > what
> > 
> > > backend configuration to use ?
> > 
> > Is it then still a mock?
> 
> I thought this was debatable. I assume the consensus is to not provide
> realistic mocks, and only setup specific backend if really needed.

Completing sling-mock-oak makes sense indeed as there are already "mocks" 
based on real repositories.

O.

> 
> Regards,
> 
> Timothee
> 
> > Regards,
> > O.
> > 
> > > Regards,
> > > 
> > > Timothee
> > > 
> > > [0] org.apache.jackrabbit.oak.plugins.blob.
> > 
> > AbstractSharedCachingDataStore
> > 
> > > [1] org.apache.jackrabbit.oak.plugins.blob.datastore.
> > 
> > CachingFileDataStore


Re: Integration tests with specific Oak backend

Posted by Timothee Maret <tm...@apache.org>.
Hi,

2017-01-20 18:15 GMT+01:00 Oliver Lietz <ap...@oliverlietz.de>:

> On Friday 20 January 2017 15:47:16 Timothee Maret wrote:
> > Hi,
>
> Hi,
>
> > I would like to add an integration test that covers SCD binary less
> feature
> > (Use Binary References) in a specific setup:
> >
> >           Two instances with shared caching blob store (AFAIK any blob
> > store that implements [0] such as [1]).
> >
> > I wonder two things
> >
> > 1. Is it fine to run integration tests using FileDataStores (rather than
> > the potentially much faster memory based data stores) ?
>
> Oak Server, Scripting Thymeleaf and FreeMarker use "real" Sling instances
> with
> SegmentNodeStore already and Sling Karaf a DocumentNodeStore with Mongo
> also –
> so it should be fine. See Michael's comment in OAK-4862 and be careful when
> using mocks and MemoryNodeStore.
>
>
Thanks for the pointers!


> > 2. Would it make sense to complete the
> > org.apache.sling.testing.sling-mock-oak in order to allow specifying
> what
> > backend configuration to use ?
>
> Is it then still a mock?
>

I thought this was debatable. I assume the consensus is to not provide
realistic mocks, and only setup specific backend if really needed.

Regards,

Timothee


>
> Regards,
> O.
>
> > Regards,
> >
> > Timothee
> >
> > [0] org.apache.jackrabbit.oak.plugins.blob.
> AbstractSharedCachingDataStore
> > [1] org.apache.jackrabbit.oak.plugins.blob.datastore.
> CachingFileDataStore
>
>

Re: Integration tests with specific Oak backend

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Friday 20 January 2017 15:47:16 Timothee Maret wrote:
> Hi,

Hi,

> I would like to add an integration test that covers SCD binary less feature
> (Use Binary References) in a specific setup:
> 
>           Two instances with shared caching blob store (AFAIK any blob
> store that implements [0] such as [1]).
> 
> I wonder two things
> 
> 1. Is it fine to run integration tests using FileDataStores (rather than
> the potentially much faster memory based data stores) ?

Oak Server, Scripting Thymeleaf and FreeMarker use "real" Sling instances with 
SegmentNodeStore already and Sling Karaf a DocumentNodeStore with Mongo also – 
so it should be fine. See Michael's comment in OAK-4862 and be careful when 
using mocks and MemoryNodeStore.

> 2. Would it make sense to complete the
> org.apache.sling.testing.sling-mock-oak in order to allow specifying what
> backend configuration to use ?

Is it then still a mock?

Regards,
O.

> Regards,
> 
> Timothee
> 
> [0] org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore
> [1] org.apache.jackrabbit.oak.plugins.blob.datastore.CachingFileDataStore