You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2012/03/21 16:02:21 UTC
svn commit: r1303420 - in /cxf/trunk/services/sts/sts-core: pom.xml
src/main/java/org/apache/cxf/sts/cache/DefaultInMemoryTokenStore.java
Author: coheigea
Date: Wed Mar 21 15:02:20 2012
New Revision: 1303420
URL: http://svn.apache.org/viewvc?rev=1303420&view=rev
Log:
Switching to forkmode "once" for the STS core tests
- This can give a dramatic speedup if you are running the tests without generating entropy by moving the mouse etc., as forking per test involves re-seeding SecureRandom for each test
Modified:
cxf/trunk/services/sts/sts-core/pom.xml
cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/DefaultInMemoryTokenStore.java
Modified: cxf/trunk/services/sts/sts-core/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/pom.xml?rev=1303420&r1=1303419&r2=1303420&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/pom.xml (original)
+++ cxf/trunk/services/sts/sts-core/pom.xml Wed Mar 21 15:02:20 2012
@@ -31,7 +31,7 @@
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
<properties>
- <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
+ <cxf.surefire.fork.mode>once</cxf.surefire.fork.mode>
</properties>
<dependencies>
Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/DefaultInMemoryTokenStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/DefaultInMemoryTokenStore.java?rev=1303420&r1=1303419&r2=1303420&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/DefaultInMemoryTokenStore.java (original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/DefaultInMemoryTokenStore.java Wed Mar 21 15:02:20 2012
@@ -38,8 +38,13 @@ public class DefaultInMemoryTokenStore i
private boolean autoRemove = true;
public DefaultInMemoryTokenStore() {
- cache = new Cache("STS", 5000, false, false, 3600, 3600);
- cacheManager.addCache(cache);
+ String key = "STS";
+ if (!cacheManager.cacheExists(key)) {
+ cache = new Cache(key, 5000, false, false, 3600, 3600);
+ cacheManager.addCache(cache);
+ } else {
+ cache = cacheManager.getCache(key);
+ }
}
public void add(SecurityToken token) {