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: [email protected]
For additional commands, e-mail: [email protected]