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 Mete Atamel <ma...@adobe.com> on 2012/10/25 15:38:21 UTC
branch/merge bug in MicroKernelImpl?
Hi,
I think I found a bug with branch/merge in MicroKernelImpl but wanted to
make sure. The last assert in the test fails. Could someone verify that
this is indeed a bug?
@Test
public void test() {
mk.commit("", "+\"/trunk\":{}", null, "");
mk.commit("", "+\"/trunk/child1\":{}", null, "");
String branchRev = mk.branch(null);
branchRev = mk.commit("", "+\"/trunk/child1/child2\":{}",
branchRev, "");
mk.commit("", "+\"/trunk/child3\":{}", null, "");
mk.merge(branchRev, "");
assertTrue(mk.nodeExists("/trunk", null));
assertTrue(mk.nodeExists("/trunk/child1", null));
assertTrue(mk.nodeExists("/trunk/child1/child2", null));
assertTrue(mk.nodeExists("/trunk/child3", null));
}
-Mete
Re: branch/merge bug in MicroKernelImpl?
Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Oct 26, 2012 at 10:54 AM, Mete Atamel <ma...@adobe.com> wrote:
> Hi Stefan, I have a bunch of branch/merge tests in my fork [0] that you
> might want to run through with MicroKernelImpl. A few test cases fail with
> MicroKernelImpl. They might be the same issue I mentioned yesterday or
> separate issues, not sure.
excellent, i'll check.
thanks
stefan
>
> -Mete
>
> [0]
> https://github.com/meteatamel/jackrabbit-oak/blob/6b4635edc5908f346f5bc0e35
> 4cf2563d6aa6da7/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/imp
> l/MongoMKBranchMergeTest.java
>
>
> On 10/25/12 3:55 PM, "Stefan Guggisberg" <st...@gmail.com>
> wrote:
>
>>On Thu, Oct 25, 2012 at 3:38 PM, Mete Atamel <ma...@adobe.com> wrote:
>>> Hi,
>>>
>>> I think I found a bug with branch/merge in MicroKernelImpl but wanted to
>>> make sure. The last assert in the test fails. Could someone verify that
>>> this is indeed a bug?
>>
>>thanks, i'll have a look.
>>
>>cheers
>>stefan
>>
>>>
>>> @Test
>>> public void test() {
>>> mk.commit("", "+\"/trunk\":{}", null, "");
>>> mk.commit("", "+\"/trunk/child1\":{}", null, "");
>>>
>>> String branchRev = mk.branch(null);
>>> branchRev = mk.commit("", "+\"/trunk/child1/child2\":{}",
>>> branchRev, "");
>>>
>>> mk.commit("", "+\"/trunk/child3\":{}", null, "");
>>>
>>> mk.merge(branchRev, "");
>>>
>>> assertTrue(mk.nodeExists("/trunk", null));
>>> assertTrue(mk.nodeExists("/trunk/child1", null));
>>> assertTrue(mk.nodeExists("/trunk/child1/child2", null));
>>> assertTrue(mk.nodeExists("/trunk/child3", null));
>>> }
>>>
>>>
>>> -Mete
>>>
>
Re: branch/merge bug in MicroKernelImpl?
Posted by Stefan Guggisberg <st...@gmail.com>.
hi mete
On Fri, Oct 26, 2012 at 10:54 AM, Mete Atamel <ma...@adobe.com> wrote:
> Hi Stefan, I have a bunch of branch/merge tests in my fork [0] that you
> might want to run through with MicroKernelImpl. A few test cases fail with
> MicroKernelImpl. They might be the same issue I mentioned yesterday or
> separate issues, not sure.
i found and fixed the problem which caused the issue that you initially reported
(svn rev 1402529).
some of your tests in your fork still failed. however, this time legitimately
due to a bug in your tests ;)
with the following fix the tests run fine against MicroKernelImpl:
private String addNodes(String rev, String...nodes) {
String newRev = rev;
for (String node : nodes) {
- newRev = mk.commit("", "+\"" + node + "\":{}", rev, "");
+ newRev = mk.commit("", "+\"" + node + "\":{}", newRev, "");
}
return newRev;
}
private String removeNodes(String rev, String...nodes) {
String newRev = rev;
for (String node : nodes) {
- newRev = mk.commit("", "-\"" + node + "\"", rev, "");
+ newRev = mk.commit("", "-\"" + node + "\"", newRev, "");
}
return newRev;
}
i added your tests to the MicroKernel intergation tests.
cheers
stefan
>
> -Mete
>
> [0]
> https://github.com/meteatamel/jackrabbit-oak/blob/6b4635edc5908f346f5bc0e35
> 4cf2563d6aa6da7/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/imp
> l/MongoMKBranchMergeTest.java
>
>
> On 10/25/12 3:55 PM, "Stefan Guggisberg" <st...@gmail.com>
> wrote:
>
>>On Thu, Oct 25, 2012 at 3:38 PM, Mete Atamel <ma...@adobe.com> wrote:
>>> Hi,
>>>
>>> I think I found a bug with branch/merge in MicroKernelImpl but wanted to
>>> make sure. The last assert in the test fails. Could someone verify that
>>> this is indeed a bug?
>>
>>thanks, i'll have a look.
>>
>>cheers
>>stefan
>>
>>>
>>> @Test
>>> public void test() {
>>> mk.commit("", "+\"/trunk\":{}", null, "");
>>> mk.commit("", "+\"/trunk/child1\":{}", null, "");
>>>
>>> String branchRev = mk.branch(null);
>>> branchRev = mk.commit("", "+\"/trunk/child1/child2\":{}",
>>> branchRev, "");
>>>
>>> mk.commit("", "+\"/trunk/child3\":{}", null, "");
>>>
>>> mk.merge(branchRev, "");
>>>
>>> assertTrue(mk.nodeExists("/trunk", null));
>>> assertTrue(mk.nodeExists("/trunk/child1", null));
>>> assertTrue(mk.nodeExists("/trunk/child1/child2", null));
>>> assertTrue(mk.nodeExists("/trunk/child3", null));
>>> }
>>>
>>>
>>> -Mete
>>>
>
Re: branch/merge bug in MicroKernelImpl?
Posted by Mete Atamel <ma...@adobe.com>.
Hi Stefan, I have a bunch of branch/merge tests in my fork [0] that you
might want to run through with MicroKernelImpl. A few test cases fail with
MicroKernelImpl. They might be the same issue I mentioned yesterday or
separate issues, not sure.
-Mete
[0]
https://github.com/meteatamel/jackrabbit-oak/blob/6b4635edc5908f346f5bc0e35
4cf2563d6aa6da7/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/imp
l/MongoMKBranchMergeTest.java
On 10/25/12 3:55 PM, "Stefan Guggisberg" <st...@gmail.com>
wrote:
>On Thu, Oct 25, 2012 at 3:38 PM, Mete Atamel <ma...@adobe.com> wrote:
>> Hi,
>>
>> I think I found a bug with branch/merge in MicroKernelImpl but wanted to
>> make sure. The last assert in the test fails. Could someone verify that
>> this is indeed a bug?
>
>thanks, i'll have a look.
>
>cheers
>stefan
>
>>
>> @Test
>> public void test() {
>> mk.commit("", "+\"/trunk\":{}", null, "");
>> mk.commit("", "+\"/trunk/child1\":{}", null, "");
>>
>> String branchRev = mk.branch(null);
>> branchRev = mk.commit("", "+\"/trunk/child1/child2\":{}",
>> branchRev, "");
>>
>> mk.commit("", "+\"/trunk/child3\":{}", null, "");
>>
>> mk.merge(branchRev, "");
>>
>> assertTrue(mk.nodeExists("/trunk", null));
>> assertTrue(mk.nodeExists("/trunk/child1", null));
>> assertTrue(mk.nodeExists("/trunk/child1/child2", null));
>> assertTrue(mk.nodeExists("/trunk/child3", null));
>> }
>>
>>
>> -Mete
>>
Re: branch/merge bug in MicroKernelImpl?
Posted by Stefan Guggisberg <st...@gmail.com>.
On Thu, Oct 25, 2012 at 3:38 PM, Mete Atamel <ma...@adobe.com> wrote:
> Hi,
>
> I think I found a bug with branch/merge in MicroKernelImpl but wanted to
> make sure. The last assert in the test fails. Could someone verify that
> this is indeed a bug?
thanks, i'll have a look.
cheers
stefan
>
> @Test
> public void test() {
> mk.commit("", "+\"/trunk\":{}", null, "");
> mk.commit("", "+\"/trunk/child1\":{}", null, "");
>
> String branchRev = mk.branch(null);
> branchRev = mk.commit("", "+\"/trunk/child1/child2\":{}",
> branchRev, "");
>
> mk.commit("", "+\"/trunk/child3\":{}", null, "");
>
> mk.merge(branchRev, "");
>
> assertTrue(mk.nodeExists("/trunk", null));
> assertTrue(mk.nodeExists("/trunk/child1", null));
> assertTrue(mk.nodeExists("/trunk/child1/child2", null));
> assertTrue(mk.nodeExists("/trunk/child3", null));
> }
>
>
> -Mete
>
Re: branch/merge bug in MicroKernelImpl?
Posted by Stefan Guggisberg <st...@gmail.com>.
hi mete,
On Thu, Oct 25, 2012 at 3:38 PM, Mete Atamel <ma...@adobe.com> wrote:
> Hi,
>
> I think I found a bug with branch/merge in MicroKernelImpl but wanted to
> make sure. The last assert in the test fails. Could someone verify that
> this is indeed a bug?
it's definitely a bug, i created a jira issue [0].
thanks!
stefan
[0] https://issues.apache.org/jira/browse/OAK-407
>
> @Test
> public void test() {
> mk.commit("", "+\"/trunk\":{}", null, "");
> mk.commit("", "+\"/trunk/child1\":{}", null, "");
>
> String branchRev = mk.branch(null);
> branchRev = mk.commit("", "+\"/trunk/child1/child2\":{}",
> branchRev, "");
>
> mk.commit("", "+\"/trunk/child3\":{}", null, "");
>
> mk.merge(branchRev, "");
>
> assertTrue(mk.nodeExists("/trunk", null));
> assertTrue(mk.nodeExists("/trunk/child1", null));
> assertTrue(mk.nodeExists("/trunk/child1/child2", null));
> assertTrue(mk.nodeExists("/trunk/child3", null));
> }
>
>
> -Mete
>