You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2015/08/19 15:24:04 UTC

Multiplexing DocumentStore, NodeStoreTest fails even without mounts (was: A multiplexing implementation of the DocumentStore)

Hi Robert,

On Wed, Jul 8, 2015 at 3:27 PM, Robert Munteanu <ro...@apache.org> wrote:
> ...I am working on a prototype to multiplex multiple DocumentStore
> instances behind a single DocumentStore...

I played with this stuff and added a fixture to run the standard
oak-core tests on a MultiplexingDocumentStore.

My latest finding is that NodeStoreTests fails in that case, even if
the MultiplexingDocumentStore has no mounts, just a root store, which
is surprising.
I'll investigate more, but maybe that's useful info for you.

Here's what I get at my commit
https://github.com/bdelacretaz/jackrabbit-oak/commit/66f8de76ece6f32b0151deaca47d63821f9908bc

$ mvn clean test -Dnsfixtures=MEMORY_MULTI_NS -Dtest=NodeStoreTest
...
Failed tests:
beforeCommitHook[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest)
  compareAgainstBaseState20[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest):
expected:<21> but was:<20>
  compareAgainstBaseState100[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest):
expected:<101> but was:<80>
  rebaseWithFailedMerge[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest):
must throw CommitFailedException

Feel free to merge the MEMORY_MULTI_NS fixture stuff if that's useful
to you, of course.

-Bertrand

Re: Multiplexing DocumentStore, NodeStoreTest fails even without mounts (was: A multiplexing implementation of the DocumentStore)

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Aug 19, 2015 at 5:09 PM, Michael Dürig <md...@apache.org> wrote:
> ...AFAIKs the problem is with the test setup where state is kept between test
> executions. Namely the SpyingMemoryNodeStore field...

Good catch, this indeed fixes the oak-core tests on my branch, thanks!

-Bertrand

Re: Multiplexing DocumentStore, NodeStoreTest fails even without mounts (was: A multiplexing implementation of the DocumentStore)

Posted by Michael Dürig <md...@apache.org>.
AFAIKs the problem is with the test setup where state is kept between 
test executions. Namely the SpyingMemoryNodeStore field at 
org.apache.jackrabbit.oak.NodeStoreFixture#rootStore. If I create a new 
instance here every time these tests pass for me.

Michael

On 19.8.15 3:24 , Bertrand Delacretaz wrote:
> Hi Robert,
>
> On Wed, Jul 8, 2015 at 3:27 PM, Robert Munteanu <ro...@apache.org> wrote:
>> ...I am working on a prototype to multiplex multiple DocumentStore
>> instances behind a single DocumentStore...
>
> I played with this stuff and added a fixture to run the standard
> oak-core tests on a MultiplexingDocumentStore.
>
> My latest finding is that NodeStoreTests fails in that case, even if
> the MultiplexingDocumentStore has no mounts, just a root store, which
> is surprising.
> I'll investigate more, but maybe that's useful info for you.
>
> Here's what I get at my commit
> https://github.com/bdelacretaz/jackrabbit-oak/commit/66f8de76ece6f32b0151deaca47d63821f9908bc
>
> $ mvn clean test -Dnsfixtures=MEMORY_MULTI_NS -Dtest=NodeStoreTest
> ...
> Failed tests:
> beforeCommitHook[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest)
>    compareAgainstBaseState20[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest):
> expected:<21> but was:<20>
>    compareAgainstBaseState100[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest):
> expected:<101> but was:<80>
>    rebaseWithFailedMerge[0](org.apache.jackrabbit.oak.spi.state.NodeStoreTest):
> must throw CommitFailedException
>
> Feel free to merge the MEMORY_MULTI_NS fixture stuff if that's useful
> to you, of course.
>
> -Bertrand
>