Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3D36D252 for ; Thu, 23 May 2013 14:15:47 +0000 (UTC) Received: (qmail 79233 invoked by uid 500); 23 May 2013 14:15:47 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 79201 invoked by uid 500); 23 May 2013 14:15:47 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 79184 invoked by uid 99); 23 May 2013 14:15:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 14:15:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alex.parvulescu@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 14:15:41 +0000 Received: by mail-vc0-f173.google.com with SMTP id ht10so2253920vcb.32 for ; Thu, 23 May 2013 07:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Twvr8SUkRab+Pdd6Isv6ZkI6DubVSkyisuS85zMsHoQ=; b=YqJe7bggPFkzD4wZydE31BzSZJxflMIbTU8PhZTJ+AN60HwQvd1/Crssm/RtKDfh6/ 4Nsa8eDdt0BRIcr4Sub6XI4zI93Rkg+1FpWePGc5CuLI/9LLyParx0mQvksIZ6fn63QI UyFRp4ZdjIsqHYg109xZavhZl77a+Imj3rS/+KF52jaoCWJqkkPpUvcdMM3aX7upUScQ LxFGUsJHIGfecNnSPnNmuyjpMGD0H050f4hzXIc8uzcua21MwX4LDCaoiLuc73v8YEF1 AcQLh8+KwnNLwgq+bSJeWciDU472dW//18+HBV0g+jDLN3VVhe+tCFEcaYYg0RtcRMdl mMjQ== MIME-Version: 1.0 X-Received: by 10.52.159.72 with SMTP id xa8mr4576994vdb.48.1369318520624; Thu, 23 May 2013 07:15:20 -0700 (PDT) Received: by 10.220.177.196 with HTTP; Thu, 23 May 2013 07:15:20 -0700 (PDT) In-Reply-To: <20130523133558.76378238889B@eris.apache.org> References: <20130523133558.76378238889B@eris.apache.org> Date: Thu, 23 May 2013 16:15:20 +0200 Message-ID: Subject: Re: svn commit: r1485701 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java From: Alex Parvulescu To: oak-dev@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=089e0160bf4801d14d04dd6350eb X-Virus-Checked: Checked by ClamAV on apache.org --089e0160bf4801d14d04dd6350eb Content-Type: text/plain; charset=ISO-8859-1 I'm wondering if we need to bootstrap the entire repo when there are enough elements for a simple test in the existing PropertyIndexTest alex On Thu, May 23, 2013 at 3:35 PM, wrote: > Author: mreutegg > Date: Thu May 23 13:35:58 2013 > New Revision: 1485701 > > URL: http://svn.apache.org/r1485701 > Log: > OAK-841: Indexing empty string fails with "there's already a child node > with name ':index'" > - Test case (currently ignored) > > Added: > > jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java > (with props) > > Added: > jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java > URL: > http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java?rev=1485701&view=auto > > ============================================================================== > --- > jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java > (added) > +++ > jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java > Thu May 23 13:35:58 2013 > @@ -0,0 +1,73 @@ > +/* > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. See the NOTICE file distributed with > + * this work for additional information regarding copyright ownership. > + * The ASF licenses this file to You under the Apache License, Version 2.0 > + * (the "License"); you may not use this file except in compliance with > + * the License. You may obtain a copy of the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > +package org.apache.jackrabbit.oak.plugins.index.property; > + > +import org.apache.jackrabbit.oak.Oak; > +import org.apache.jackrabbit.oak.api.CommitFailedException; > +import org.apache.jackrabbit.oak.api.ContentRepository; > +import org.apache.jackrabbit.oak.api.Tree; > +import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent; > +import org.apache.jackrabbit.oak.query.AbstractQueryTest; > +import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer; > +import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider; > +import org.apache.jackrabbit.oak.spi.state.NodeBuilder; > +import org.apache.jackrabbit.oak.spi.state.NodeState; > +import org.junit.Ignore; > +import org.junit.Test; > + > +import com.google.common.collect.ImmutableList; > + > +import static > org.apache.jackrabbit.oak.plugins.index.IndexUtils.createIndexDefinition; > +import static > org.apache.jackrabbit.oak.plugins.index.IndexUtils.getOrCreateOakIndex; > + > +/** > + * Test for OAK-841 > + */ > +public class EmptyPropertyTest extends AbstractQueryTest { > + > + @Override > + protected ContentRepository createRepository() { > + return new Oak() > + .with(new InitialContent()) > + .with(new RepositoryInitializer() { > + @Override > + public NodeState initialize(NodeState state) { > + NodeBuilder root = state.builder(); > + createIndexDefinition(getOrCreateOakIndex(root), > "prop", > + true, false, ImmutableList.of("prop"), > null); > + return root.getNodeState(); > + } > + }).with(new OpenSecurityProvider()) > + .with(new PropertyIndexProvider()) > + .with(new PropertyIndexEditorProvider()) > + .createContentRepository(); > + } > + > + @Ignore > + @Test > + public void emptyStringValue() throws CommitFailedException { > + Tree t = root.getTree("/"); > + t.addChild("node-1").setProperty("prop", "value"); > + root.commit(); > + > + t = root.getTree("/"); > + t.addChild("node-2").setProperty("prop", ""); > + root.commit(); > + } > +} > + > + > > Propchange: > jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java > > ------------------------------------------------------------------------------ > svn:eol-style = native > > Propchange: > jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/EmptyPropertyTest.java > > ------------------------------------------------------------------------------ > svn:keywords = Author Date Id Revision Rev URL > > > --089e0160bf4801d14d04dd6350eb--