Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28442D6F0 for ; Thu, 22 Nov 2012 19:27:48 +0000 (UTC) Received: (qmail 82594 invoked by uid 500); 22 Nov 2012 19:27:47 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 82518 invoked by uid 500); 22 Nov 2012 19:27:47 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 82509 invoked by uid 99); 22 Nov 2012 19:27:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2012 19:27:47 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=SPF_HELO_PASS,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of brian@pingtoo.com does not designate 217.154.193.216 as permitted sender) Received: from [217.154.193.216] (HELO mail2.pingtoo.com) (217.154.193.216) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2012 19:27:40 +0000 Received: from [10.1.252.200] (schizo.pingtoo.com [10.1.252.200]) by mail.pingtoo.com (Postfix) with ESMTPA id A0FAE134008 for ; Thu, 22 Nov 2012 19:27:19 +0000 (GMT) Message-ID: <50AE7C97.3090206@pingtoo.com> Date: Thu, 22 Nov 2012 19:27:19 +0000 From: Brian Burch User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: dev@tomcat.apache.org Subject: Re: [Bug 54190] TestNonLoginAndBasicAuthenticator does not test session timeout properly References: <50AE61AE.70703@pingtoo.com> <50AE7167.7010309@apache.org> In-Reply-To: <50AE7167.7010309@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 22/11/12 18:39, Mark Thomas wrote: > On 22/11/2012 17:32, Brian Burch wrote: >> On 22/11/12 16:46, bugzilla@apache.org wrote: >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=54190 >>> >>> --- Comment #3 from Mark Thomas --- >>> Your logic makes sense to me so my preference would be some more >>> comments. >> >> I will think about our discussion and try to improve the comments and so >> hopefully avoid confusing future readers. I will submit a new >> self-contained patch and obsolete the current one. >> >> >> Sorry to drift slightly (but not completely) off-topic. Could you give >> me your off-the-cuff opinion on this: >> >> Context.setSessionTimeout(int timeoutInMinutes) obliges tests that need >> to explore session timeout behaviour to hang the test process for at >> least 60 seconds, although most of that delay would be unnecessary. >> >> I don't actually know how often the Manager (is that the right >> component?) scans to expire Sessions, but it must do it more frequently >> than once a minute. > > It is the manager. It scans (goes to look up frequency) every 60 seconds > by default (10s for background process * 6 for processExpiresFrequency) > >> I realise the method signature is part of a public api, but do you have >> a view on adding an alternative method to >> org.apache.catalina.core.StandardContext so that unit tests could set a >> session timeout in seconds? > > I'm neutral. The delay doesn't really bother me. If you do go this way, > you'll need to modify processExpiresFrequency for the Manager as well so > checks happen more often. Perfect answer, thanks! If the Manager by default is scanning every 60 seconds, then it makes sense to live with a session timeout of 1 minute and a test case wait of about 70 seconds. That is what I am doing at the moment, and there isn't much point being clever unless a test suite is going to call for more than a few timeouts. > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org