You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/07/28 18:51:52 UTC
svn commit: r1366709 - in /tomcat/tc7.0.x/trunk: ./
test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
Author: markt
Date: Sat Jul 28 16:51:51 2012
New Revision: 1366709
URL: http://svn.apache.org/viewvc?rev=1366709&view=rev
Log:
Fix (normally unused) DIGEST performance test. Failing to clear the cached principal meant that the DIGEST auth was only performed once per thread
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1366708
Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java?rev=1366709&r1=1366708&r2=1366709&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java Sat Jul 28 16:51:51 2012
@@ -52,7 +52,7 @@ public class TesterDigestAuthenticatorPe
@Test
public void testSimple() throws Exception {
- doTest(100, 1000000);
+ doTest(4, 100000);
}
public void doTest(int threadCount, int requestCount) throws Exception {
@@ -153,6 +153,8 @@ public class TesterDigestAuthenticatorPe
if (authenticator.authenticate(request, response, config)) {
success++;
}
+ // Clear out authenticated user ready for next iteration
+ request.setUserPrincipal(null);
} catch (IOException ioe) {
// Ignore
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org