Author: coheigea
Date: Tue Mar 5 10:32:07 2013
New Revision: 1452723
URL: http://svn.apache.org/r1452723
Log:
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.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
Modified:
cxf/branches/2.7.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.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java?rev=1452723&r1=1452722&r2=1452723&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
(original)
+++
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
Tue Mar 5 10:32:07 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) {