tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1366708 - /tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
Date Sat, 28 Jul 2012 16:50:11 GMT
Author: markt
Date: Sat Jul 28 16:50:11 2012
New Revision: 1366708

URL: http://svn.apache.org/viewvc?rev=1366708&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/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java

Modified: tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java?rev=1366708&r1=1366707&r2=1366708&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
Sat Jul 28 16:50:11 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 {
@@ -155,6 +155,8 @@ public class TesterDigestAuthenticatorPe
                     if (authenticator.authenticate(request, response)) {
                         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


Mime
View raw message