Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Received: (qmail 38860 invoked from network); 1 Dec 2009 17:59:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Dec 2009 17:59:57 -0000 Received: (qmail 72167 invoked by uid 500); 1 Dec 2009 17:59:57 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 72135 invoked by uid 500); 1 Dec 2009 17:59:56 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 72125 invoked by uid 99); 1 Dec 2009 17:59:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 17:59:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andrew.r.jaquith@gmail.com designates 209.85.221.191 as permitted sender) Received: from [209.85.221.191] (HELO mail-qy0-f191.google.com) (209.85.221.191) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 17:59:48 +0000 Received: by qyk29 with SMTP id 29so389577qyk.32 for ; Tue, 01 Dec 2009 09:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=egYrUTNhRLMBfEhyr5hZOe1MH0JKhEfPSYKvJqfYe9c=; b=Gw37m4bB8nHhQ3e2k7InFsMnP8T/oKKmZbRBxwkke3ePsEGdzlUt4m/fQeFcL9b1+a DjVcVOnDgrdl8bEvGPlcdXw7iWN9trzCxtSGVKuCiwFYpPz+Rvx8cs6ReVKxd3btvxyL /3TL2Mze2J6sXX8zUL0ViCItAZI6Hz4JuVk8k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DHpEfn46zVcobwbHvhbxkl+Vaexx/SywKRiVdxUoB/zvoxPpPZUF9GRjcLwdw7j6IW RQu6Gv8SG1LIS/e0HDHs1TNPBv1vKzerd0jd6c/I+mtP2Q9mc/PJIiXeAFjSCDgzVt8h mImQ6wZ9b/HVmCienOeLdfXZ8DueAN6D9+yMk= MIME-Version: 1.0 Received: by 10.224.41.84 with SMTP id n20mr3080671qae.205.1259690367178; Tue, 01 Dec 2009 09:59:27 -0800 (PST) In-Reply-To: <9EC83A3C-FE3F-41DB-9185-E075F3BEF28B@ecyrd.com> References: <9EC83A3C-FE3F-41DB-9185-E075F3BEF28B@ecyrd.com> Date: Tue, 1 Dec 2009 12:59:27 -0500 Message-ID: Subject: Re: Failing DeleteActionBean tests From: Andrew Jaquith To: jspwiki-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The easy way to test this hypothesis, which is an interesting one, would be to unhook the ReferenceManager event listener and see if it makes a difference. The RefMgr tests will fail, but perhaps some of the other failing tests will succeed. Generally, though, we should definitely do one of two things: either create a separate "updater" JCR session for the ReferenceManager event listener, and have it do its own saves, OR remove all save()s from ReferenceManager entirely. Right now it does saves in the context of the caller's JCR session, which doesn't feel right. Andrew On Tue, Dec 1, 2009 at 11:25 AM, Janne Jalkanen wrote: > > The test seems correct. =A0There seems to be something fairly odd going o= n > with respect to versioning; for example, ContentManagerTest.deleteAllPage= s() > fails because it deletes all pages ok, but at the last instant it recreat= es > the pages as empty. > > My guess is that it was a bug in ContentManager that priha 0.6.x revealed= ; > and I also have a nagging suspicion it has something to do with > ReferenceManager, as it seems to me that the pages are recreated by the > event handlers as a side effect. =A0This could happen if the page is firs= t > deleted, then save()d, then a event handler adds a property to it and > recreates the Node as a sanity check or something. Haven't yet had time t= o > peek into it very deeply. > > /Janne > > On Dec 1, 2009, at 15:44 , Andrew Jaquith wrote: > >> Janne, can I get a quick sanity check on something? >> >> =A0 =A0 =A0// Save two versions of the test page >> =A0 =A0 =A0 m_engine.saveText( "Test", "This is the first version" ); >> =A0 =A0 =A0 m_engine.saveText( "Test", "This is the second version" ); >> >> =A0 =A0 =A0 // Make sure they both saved ok >> =A0 =A0 =A0 WikiPage v1 =3D m_engine.getPage( "Test", 1 ); >> =A0 =A0 =A0 WikiPage v2 =3D m_engine.getPage( "Test", 2 ); >> =A0 =A0 =A0 assertNotNull( "Did not save page Test, v1!", v1 ); >> =A0 =A0 =A0 assertNotNull( "Did not save page Test, v2!", v2 ); >> =A0 =A0 =A0 assertEquals( "This is the first version", >> m_engine.getPureText( v1 ).trim() ); >> >> The last assertion is failing. When WikiEngine.getPureText(v1) is >> called, it is returning "This is the second version", which seems >> wrong . It should return the first version, right? >> >> Back when the trunk tests all ran clean (aka "the good old days"), >> this test worked also. So it seems to me that some recent changes >> caused the results to change. So was the test wrong all along, or is >> there a bug somewhere? >> >> Andrew > >