Author: coheigea
Date: Tue Mar  5 10:48:55 2013
New Revision: 1452732

URL: http://svn.apache.org/r1452732
Log:
Merged revisions 1452725 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1452725 | coheigea | 2013-03-05 10:35:01 +0000 (Tue, 05 Mar 2013) | 18 lines

  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.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java

Modified: 
cxf/branches/2.5.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.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java?rev=1452732&r1=1452731&r2=1452732&view=diff
==============================================================================
--- 
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
 (original)
+++ 
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
 Tue Mar  5 10:48:55 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);
@@ -144,7 +144,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 {
@@ -158,11 +158,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) {


Reply via email to