Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 27238 invoked from network); 2 Nov 2007 20:23:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2007 20:23:11 -0000 Received: (qmail 19958 invoked by uid 500); 2 Nov 2007 20:22:58 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 19921 invoked by uid 500); 2 Nov 2007 20:22:58 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 19903 invoked by uid 99); 2 Nov 2007 20:22:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2007 13:22:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kmoh.raj@gmail.com designates 209.85.132.245 as permitted sender) Received: from [209.85.132.245] (HELO an-out-0708.google.com) (209.85.132.245) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2007 20:23:01 +0000 Received: by an-out-0708.google.com with SMTP id b15so129157ana for ; Fri, 02 Nov 2007 13:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:references:in-reply-to:subject:date:organization:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:content-language:message-id; bh=l7dveKMQlutGm3XFhw7uboqEgGKF/aGUuIOJ/cOu/QU=; b=XRBl3IBz94Mq+VmMobx/P9PjOIOXfLfFaErMPMwkB77JDjNaJreDmMJrDPGWIIZilUSekPECZAS+5xfuIFojeabA3vYw7ohSJrPqLbeyMQV2LlDU8jQdUJZeToR4BsEzD93axRM/P1tYzEZKkJl45Db9ptHAjyB3yQAbM9uhzds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:references:in-reply-to:subject:date:organization:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:content-language:message-id; b=Gxc77EjPCYe4q6Sejezakv0txAY68f5Hb+WR180PJYBKQeqGMa+6m2AQB8cI6xDsMV5LVtJ5Al5RtHXPF74kCJSf4OGsf4UwqThOiGI9chsuAfmFGd4a59Aeq0JcegbrrJ/vlOG5+wVe+rxlerDntXdM7U8G121uCgKnz5HrlMI= Received: by 10.100.209.11 with SMTP id h11mr3420433ang.1194034960464; Fri, 02 Nov 2007 13:22:40 -0700 (PDT) Received: from HOME01 ( [24.223.154.232]) by mx.google.com with ESMTPS id x55sm1387445hsx.2007.11.02.13.22.39 (version=SSLv3 cipher=RC4-MD5); Fri, 02 Nov 2007 13:22:39 -0700 (PDT) From: "Mohan K R" To: "'Jetspeed Developers List'" References: <49336C35F4B12E4FA1B5D9B63B187C2D0568F96E@USCIMPLM004.net.plm.eds.com> <472B375A.8070201@hippo.nl> <472B3891.2050805@douma.nu> <49336C35F4B12E4FA1B5D9B63B187C2D05690098@USCIMPLM004.net.plm.eds.com> <472B3E03.3060003@douma.nu> In-Reply-To: <472B3E03.3060003@douma.nu> Subject: RE: Failing test cases in in components/portal Date: Fri, 2 Nov 2007 16:22:44 -0400 Organization: None MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcgdY5pvv+Xobm/rQuqf38W6/obLgAAKPLfw Content-Language: en-us Message-ID: <472b870f.37322c0a.08bb.0050@mx.google.com> X-Virus-Checked: Checked by ClamAV on apache.org Do the tests work with Maven-2, when I give -P test and invoke maven2 it fails. Or what profiles do we need to activate for Maven-2. Thanks Mohan -----Original Message----- From: Ate Douma [mailto:ate@douma.nu] Sent: Friday, November 02, 2007 11:11 AM To: Jetspeed Developers List Subject: Re: Failing test cases in in components/portal Patch applied and committed as all tests are working again! Regards, Ate Weaver, Scott wrote: > Same here, thanks! > > -scott > >> -----Original Message----- >> From: Ate Douma [mailto:ate@douma.nu] >> Sent: Friday, November 02, 2007 10:48 AM >> To: Jetspeed Developers List >> Subject: Re: Failing test cases in in components/portal >> >> Very cool Dennis! >> >> I'll test out your patch right away. >> >> You saved me a lot of time today, thanks. >> >> Regards, >> >> Ate >> >> Dennis Dam wrote: >>> Hey Scott/ Ate, >>> >>> I also managed to fix the other two tests, TestLayout and >>> TestPortletPlacement. I ran a full Jetspeed test, successfully! >>> >>> A few notes on my changes: >>> >>> TestLayout: >>> >>> * One test failed because a test tried to move a root fragment to > the >>> right. There was a change in the implementation of MovePortletAction >>> that now returns a "failure" when you try to move a root fragment. > This >>> is because it cannot find a parent for the root fragment (see >>> BasePortletAction). Possibly in the past it returned "success", but > it >>> didn't move the root fragment. I simply disabled the test for now. >>> >>> * Other tests failed because they were invalid. For example, > applying a >>> "moveright" action for a fragment which is already in the rightmost >>> column, but the test expects the column number to change. I changed > the >>> "expected column" number so that it matches the "old column" number, >>> which is correct IMO. >>> >>> * I also changed FragmentUtil (which creates the mock > RequestContext), >>> so that a non-null Subject is set, to avoid a NPE in >>> MovePortletAction.getRoles(). >>> >>> TestPortletPlacement: >>> >>> * there was a test which checks the number of columns in a page. The >>> mock page contained 2 columns (see FragmentUtil), but the test > asserts >>> with 3 columns. I changed 3 to 2. >>> >>> Dennis >>> >>> >>> >>> Here is the patch : >>> >>> Index: >>> > components/portal/src/test/org/apache/jetspeed/layout/FragmentUtil.java >>> =================================================================== >>> --- >>> > components/portal/src/test/org/apache/jetspeed/layout/FragmentUtil.java >>> (revision 591304) >>> +++ >>> > components/portal/src/test/org/apache/jetspeed/layout/FragmentUtil.java >>> (working copy) >>> @@ -16,6 +16,8 @@ >>> */ >>> package org.apache.jetspeed.layout; >>> >>> +import javax.security.auth.Subject; >>> + >>> import org.apache.jetspeed.om.page.ContentPage; >>> import org.apache.jetspeed.om.page.Fragment; >>> import org.apache.jetspeed.om.page.Page; >>> @@ -104,7 +106,9 @@ >>> >>> RequestContext a_oRC = new JetspeedRequestContext(request, >>> response, >>> config, null); >>> - >>> + + a_oRC.setSubject(new Subject()); >>> + Page a_oPage = setupPage(); >>> ContentPage a_oContentPage = new ContentPageImpl(a_oPage); >>> >>> Index: >>> > components/portal/src/test/org/apache/jetspeed/layout/TestPortletPlaceme > nt >> .java >>> =================================================================== >>> --- >>> > components/portal/src/test/org/apache/jetspeed/layout/TestPortletPlaceme > nt >> .java >>> (revision 591304) >>> +++ >>> > components/portal/src/test/org/apache/jetspeed/layout/TestPortletPlaceme > nt >> .java >>> (working copy) >>> @@ -41,7 +41,7 @@ >>> { >>> PortletPlacementContext ppc = new >>> PortletPlacementContextImpl(requestContext); >>> int a_iNumCols = ppc.getNumberColumns(); >>> - assertEquals(a_iNumCols, 3); >>> + assertEquals(a_iNumCols, 2); >>> >>> int a_iNumRows = ppc.getNumberRows(1); >>> assertEquals(a_iNumRows, 2); >>> Index: >>> > components/portal/src/test/org/apache/jetspeed/layout/TestLayout.java >>> =================================================================== >>> --- >>> > components/portal/src/test/org/apache/jetspeed/layout/TestLayout.java >>> (revision 591304) >>> +++ >>> > components/portal/src/test/org/apache/jetspeed/layout/TestLayout.java >>> (working copy) >>> @@ -216,7 +216,8 @@ >>> >>> moveSuccess("moveleft", "1", "1", "0", "0", "0", "0", "0"); > // >>> Shouldn't >>> > // >> move >>> - moveSuccess("moveleft", "6", "0", "0", "0", "0", "0", "0"); > // >>> Shouldn't >>> +// Root layout ("6") shouldn't/cannot be moved, so the following > test >>> doesn't make sense >>> +// moveSuccess("moveleft", "6", "0", "0", "0", "0", "0", "0"); > // >>> Shouldn't >>> > // >> move >>> moveSuccess("moveleft", "3", "2", "0", "1", "0", "1", "0"); > // >>> Straight >>> > // >>> across >>> @@ -229,11 +230,11 @@ >>> >>> // across >>> moveSuccess("moveright", "2", "1", "1", "2", "1", "2", "1"); > // >>> Straight >>> >>> // across >>> - moveSuccess("moveright", "3", "2", "0", "3", "0", "3", > "0"); // >>> Shouldn't >>> + moveSuccess("moveright", "3", "2", "0", "3", "0", "2", > "0"); // >>> Shouldn't >>> // >>> // move >>> - moveSuccess("moveright", "4", "2", "1", "3", "0", "3", > "0"); // >>> Shouldn't >>> + moveSuccess("moveright", "4", "2", "1", "3", "0", "2", > "1"); // >>> Shouldn't >>> >>> // move >>> - moveSuccess("moveright", "5", "2", "2", "3", "0", "3", > "0"); // >>> Shouldn't >>> + moveSuccess("moveright", "5", "2", "2", "3", "0", "2", > "2"); // >>> Shouldn't >>> >>> // move >>> >>> moveSuccess("moveup", "2", "1", "1", "1", "0", "1", "0"); // >>> Straight >>> @@ -287,7 +288,6 @@ >>> } >>> >>> valve.invoke(rc, null); >>> - >>> // Take a look at the response to verify a failiure >>> TestLayout.assertTrue("couldn't find value", >>> FragmentUtil.findValue(rc, >>> "success")); >>> >>> >>> >>> >>> >>> > --------------------------------------------------------------------- >>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org >>> For additional commands, e-mail: > jetspeed-dev-help@portals.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org >> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org