tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1366709 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java
Date Sat, 28 Jul 2012 16:51:52 GMT
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


Mime
View raw message