Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 83718 invoked from network); 21 Apr 2005 08:01:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Apr 2005 08:01:52 -0000 Received: (qmail 43832 invoked by uid 500); 21 Apr 2005 08:02:03 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 43815 invoked by uid 500); 21 Apr 2005 08:02:03 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 43807 invoked by uid 99); 21 Apr 2005 08:02:02 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 21 Apr 2005 01:02:02 -0700 Received: (qmail 83715 invoked by uid 65534); 21 Apr 2005 08:01:50 -0000 Message-ID: <20050421080150.83714.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r164010 - /incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java Date: Thu, 21 Apr 2005 08:01:50 -0000 To: jackrabbit-cvs@incubator.apache.org From: mreutegg@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: mreutegg Date: Thu Apr 21 01:01:46 2005 New Revision: 164010 URL: http://svn.apache.org/viewcvs?rev=3D164010&view=3Drev Log: Add test case for Lock.isSessionScoped(), contributed by Vinzenz Wyser. Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock= /LockTest.java Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/ap= i/lock/LockTest.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/= apache/jackrabbit/test/api/lock/LockTest.java?rev=3D164010&r1=3D164009&r2= =3D164010&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock= /LockTest.java (original) +++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock= /LockTest.java Thu Apr 21 01:01:46 2005 @@ -334,6 +334,32 @@ } =20 /** + * Test Lock.isSessionScoped() + */ + public void testIsSessionScoped() throws RepositoryException { + // create two lockable nodes + Node n1 =3D testRootNode.addNode(nodeName1, testNodeType); + n1.addMixin(mixLockable); + Node n2 =3D testRootNode.addNode(nodeName2, testNodeType); + n2.addMixin(mixLockable); + testRootNode.save(); + + // lock node 1 session-scoped + Lock lock1 =3D n1.lock(false, true); + assertTrue("Lock.isSessionScoped() must be true if the lock " + + "is session-scoped", + lock1.isSessionScoped()); + + // lock node 2 open-scoped + Lock lock2 =3D n2.lock(false, false); + assertFalse("Lock.isSessionScoped() must be false if the lock " + + "is open-scoped", + lock2.isSessionScoped()); + + n2.unlock(); + } + + /** * Test locks are released when session logs out */ public void testLogout() throws Exception {