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 2013/03/05 11:35:02 UTC
svn commit: r1452725 -
/cxf/branches/2.6.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
Author: coheigea
Date: Tue Mar 5 10:35:01 2013
New Revision: 1452725
URL: http://svn.apache.org/r1452725
Log:
Merged revisions 1452723 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
........
r1452723 | coheigea | 2013-03-05 10:32:07 +0000 (Tue, 05 Mar 2013) | 10 lines
Merged revisions 1452715 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1452715 | coheigea | 2013-03-05 10:12:32 +0000 (Tue, 05 Mar 2013) | 2 lines
Another attempted fix for sporadic STS test failures
........
........
Modified:
cxf/branches/2.6.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
Modified: cxf/branches/2.6.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java?rev=1452725&r1=1452724&r2=1452725&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java (original)
+++ cxf/branches/2.6.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java Tue Mar 5 10:35:01 2013
@@ -96,7 +96,7 @@ public class CachingTest extends Abstrac
// Change the STSClient so that it can no longer find the STS
BindingProvider p = (BindingProvider)port;
- clearSTSClient(p);
+ clearSTSClient(p, bus);
// This should succeed as the token is cached
doubleIt(port, 30);
@@ -145,7 +145,7 @@ public class CachingTest extends Abstrac
// Change the STSClient so that it can no longer find the STS
BindingProvider p = (BindingProvider)port;
- clearSTSClient(p);
+ clearSTSClient(p, bus);
// This should fail as it can't get the token
try {
@@ -159,11 +159,8 @@ public class CachingTest extends Abstrac
bus.shutdown(true);
}
- private void clearSTSClient(BindingProvider p) throws BusException, EndpointException {
- STSClient stsClient = (STSClient)p.getRequestContext().get(SecurityConstants.STS_CLIENT);
- stsClient.getClient().destroy();
- stsClient.setWsdlLocation(null);
- stsClient.setLocation(null);
+ private void clearSTSClient(BindingProvider p, Bus bus) throws BusException, EndpointException {
+ p.getRequestContext().put(SecurityConstants.STS_CLIENT, new STSClient(bus));
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {