Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 64760 invoked from network); 13 Nov 2007 22:28:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2007 22:28:03 -0000 Received: (qmail 73905 invoked by uid 500); 13 Nov 2007 22:27:50 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 73840 invoked by uid 500); 13 Nov 2007 22:27:50 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 73829 invoked by uid 99); 13 Nov 2007 22:27:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 14:27:50 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 22:28:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 603591A9832; Tue, 13 Nov 2007 14:27:28 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r594673 - in /cocoon/trunk/core/cocoon-core/src: main/java/org/apache/cocoon/components/source/impl/ExpiresCachingSourceValidityStrategy.java test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java Date: Tue, 13 Nov 2007 22:27:27 -0000 To: cvs@cocoon.apache.org From: vgritsenko@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071113222728.603591A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgritsenko Date: Tue Nov 13 14:27:27 2007 New Revision: 594673 URL: http://svn.apache.org/viewvc?rev=594673&view=rev Log: apparently 2 seconds (sometimes) is not enough for this test to pass Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/impl/ExpiresCachingSourceValidityStrategy.java cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/impl/ExpiresCachingSourceValidityStrategy.java URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/impl/ExpiresCachingSourceValidityStrategy.java?rev=594673&r1=594672&r2=594673&view=diff ============================================================================== --- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/impl/ExpiresCachingSourceValidityStrategy.java (original) +++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/impl/ExpiresCachingSourceValidityStrategy.java Tue Nov 13 14:27:27 2007 @@ -5,9 +5,9 @@ * 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. @@ -25,13 +25,13 @@ /** * We need to store both the cache expiration and the original source validity * the former is to determine whether to recheck the latter (see checkValidity) - * + * * @version $Id$ */ public class ExpiresCachingSourceValidityStrategy implements CachingSourceValidityStrategy { - private Log logger = LogFactory.getLog(getClass()); - + private Log logger = LogFactory.getLog(getClass()); + public SourceValidity[] getCacheValidities(CachingSource cachingSource, Source source) { return new SourceValidity[] { new ExpiresValidity(cachingSource.getExpiration()), source.getValidity() }; Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java?rev=594673&r1=594672&r2=594673&view=diff ============================================================================== --- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java (original) +++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java Tue Nov 13 14:27:27 2007 @@ -30,7 +30,9 @@ import org.apache.excalibur.source.SourceResolver; /** - * TODO describe class + * CachingSource (cached: protocol) tests + * + * @version $Id$ */ public class CachingSourceTestCase extends SitemapComponentTestCase { @@ -70,7 +72,7 @@ } public void testCachingURI() throws Exception { - String uri = "cached:http://slashdot.org/?cocoon:cache-expires=2"; + String uri = "cached:http://slashdot.org/?cocoon:cache-expires=5"; CachingSource source; @@ -93,7 +95,7 @@ // Source is still cached -- still same meta data assertSame(meta1, meta3); - Thread.sleep(2100); + Thread.sleep(5100); source = (CachingSource) resolver.resolveURI(uri); source.refresh();