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 2019/11/13 12:29:27 UTC

[cxf] branch 3.3.x-fixes updated (f148373 -> 29a13e6)

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a change to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from f148373  Updating owasp plugin
     new 5f6c449  Update Jetty
     new 8d64271  Update examples
     new e376151  cxf-rt-ws-security: fix SecurityTokenTest for Java 11
     new 35bfa6a  Update maven-bundle-plugin
     new 5eb6c92  Recording .gitmergeinfo Changes
     new b3dd860  Recording .gitmergeinfo Changes
     new a31fcda  cxf-systests-ws-rm: improve ManagedEndpointsTest stability
     new 29a13e6  Recording .gitmergeinfo Changes

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                      |   8 ++
 .../main/release/samples/java_first_jaxws/pom.xml  |   2 +-
 .../jax_rs/description_openapi_v3_web/pom.xml      |   5 +-
 .../jax_rs/description_swagger2_web/pom.xml        |   5 +-
 .../release/samples/jax_rs/sse_tomcat/README.txt   |   6 +-
 .../main/release/samples/jax_rs/sse_tomcat/pom.xml |   2 +-
 .../release/samples/jax_rs/websocket_web/pom.xml   |   5 +-
 distribution/src/main/release/samples/pom.xml      |   2 +-
 .../src/main/release/samples/wsdl_first/pom.xml    |   2 +-
 parent/pom.xml                                     |   2 +-
 pom.xml                                            |   2 +-
 .../ws/security/tokenstore/SecurityTokenTest.java  |  36 +++----
 .../cxf/systest/ws/rm/ManagedEndpointsTest.java    | 104 ++++++++-------------
 13 files changed, 72 insertions(+), 109 deletions(-)


[cxf] 08/08: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 29a13e600ddbb75bde0278fa5b55983993c20794
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Wed Nov 13 12:05:38 2019 +0000

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 9b1ec6b..d564c32 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -15,6 +15,7 @@ B 3886940ff54ca85aa989296b0c11f4941ccc5faa
 B 39e26e3b2d3059664cc9aca6c8a4ea7f60bab3f1
 B 3b96065d50dbfda39b6f09d641893fe50a74c786
 B 3bf2dcafccb3d8243dea1afdedc333e307dddde0
+B 407eeb0dea157eaa0635d0c37a7ed95463b5638f
 B 411fb51bccd3869a97e9e807f14f50ca6b1f2a10
 B 47ac71e69df225baf6dbf2e201810c5b87072af8
 B 48706603e30f076362ffd4f87b5d36b6ef83dbf5
@@ -22,6 +23,7 @@ B 4d46618c17cb5c1386d493c75faf0f89dbece267
 B 62e828c7e74d0dd5d4e337a090344a13501d8aeb
 B 64915c3d36d6ef2bef8168e912a9b8977b5b2330
 B 65869badeefe7eedd60fbc8b7d7c614a3c6d59a8
+B 67715076cb7d245aaf2d3a2442a40349d354e323
 B 6fbaddee67676f9840405bd49cb7d6e08a81bd23
 B 75e9ae0a7d31c14098e821e723cd766aa1e88785
 B 7689d884a64db0352cdb1ac9ee0628a26491f35a
@@ -34,12 +36,14 @@ B a50d2d81dd7d620061ac21b6df7943ad5c6c92cc
 B a69f0444081047e2bbae9e9b8f180d490d417f8a
 B ab3df13b8d15aa36365eb2e10b5961d17330d9a2
 B adb1b8b6280a738f3b2b4f6ea40ee902d94cc2dd
+B ae963c2258b8501f104387891d8de424d0ecc398
 B c9a2275276c6f8099585519372c24fda1cd7c3e0
 B da4dfeed6867ed628dc05c9a2dbedbebdf33db21
 B de03dfae71010bd3719430d8d7453732f4c151ea
 B e6d432be93022b5b4ac1998a546d0652861fdff3
 B f0ad8c3079c37c7f1b9eaf0be0ee42ff5ddf5325
 B f54062eb331fcf35d9f3a840f532417fccbb2673
+B f9f5d45bbe302697224128d78e8b698928a7514d
 M 09ddfdeaef6f32537dba23fa6d7ef36992b3217b
 M 160f50ed9bd9391b61417716b3a67653c9e81a98
 M 3b119ca6630f1384b93cd718d0cd95ccabc81e91


[cxf] 04/08: Update maven-bundle-plugin

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 35bfa6a228b8a186d23e6fcc67362316cc2154d6
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Fri Nov 8 14:47:20 2019 +0300

    Update maven-bundle-plugin
    
    (cherry picked from commit 007ee0d7dba5fef5387ebdcfa69efe7cd78d8fc4)
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 533cb1d..297d02d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -436,7 +436,7 @@
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
-                    <version>4.2.0</version>
+                    <version>4.2.1</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>


[cxf] 02/08: Update examples

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 8d642712dfa5fd1b6483d373c8b6825a7436ad5e
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Tue Oct 29 11:38:30 2019 +0300

    Update examples
    
    (cherry picked from commit bf1b85003e89c4b3e28384f0de476cf0e5b1af12)
    
    # Conflicts:
    #	distribution/src/main/release/samples/jax_rs/description_openapi_v3_web/pom.xml
    #	distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
    #	distribution/src/main/release/samples/jax_rs/websocket_web/pom.xml
---
 distribution/src/main/release/samples/java_first_jaxws/pom.xml      | 2 +-
 .../main/release/samples/jax_rs/description_openapi_v3_web/pom.xml  | 5 +----
 .../main/release/samples/jax_rs/description_swagger2_web/pom.xml    | 5 +----
 distribution/src/main/release/samples/jax_rs/sse_tomcat/README.txt  | 6 +++---
 distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml     | 2 +-
 distribution/src/main/release/samples/jax_rs/websocket_web/pom.xml  | 5 +----
 distribution/src/main/release/samples/wsdl_first/pom.xml            | 2 +-
 7 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/distribution/src/main/release/samples/java_first_jaxws/pom.xml b/distribution/src/main/release/samples/java_first_jaxws/pom.xml
index f9495ae..5b4ef40 100644
--- a/distribution/src/main/release/samples/java_first_jaxws/pom.xml
+++ b/distribution/src/main/release/samples/java_first_jaxws/pom.xml
@@ -29,7 +29,7 @@
         <version>3.3.5-SNAPSHOT</version>
     </parent>
     <properties>
-        <cxf.tomcat.version>8.5.41</cxf.tomcat.version>
+        <cxf.tomcat.version>8.5.47</cxf.tomcat.version>
     </properties>
     <build>
         <plugins>
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_v3_web/pom.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_v3_web/pom.xml
index e2572b0..2c9cf62 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_v3_web/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_v3_web/pom.xml
@@ -56,22 +56,19 @@ under the License.
         <dependency>
             <groupId>org.webjars</groupId>
             <artifactId>swagger-ui</artifactId>
-            <version>3.23.0</version>
+            <version>3.24.0</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>jakarta.ws.rs</groupId>
diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
index c25b02e..4cda390 100644
--- a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
@@ -56,22 +56,19 @@ under the License.
         <dependency>
             <groupId>org.webjars</groupId>
             <artifactId>swagger-ui</artifactId>
-            <version>3.23.0</version>
+            <version>3.24.0</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>jakarta.ws.rs</groupId>
diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/README.txt b/distribution/src/main/release/samples/jax_rs/sse_tomcat/README.txt
index 2e4a2e3..59fcf23 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_tomcat/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/README.txt
@@ -20,16 +20,16 @@ Building and running the demo using maven
 ---------------------------------------
 
 From the base directory of this sample (i.e., where this README file is
-located), the maven pom.xml file can be used to build and run the demo. 
+located), the maven pom.xml file can be used to build and run the demo.
 
 Using either UNIX or Windows:
 
   mvn install
   mvn -Pserver
 
-To remove the target dir, run mvn clean".  
+To remove the target dir, run mvn clean".
 
 Connecting to the SSE stream
 ---------------------------------------
 
-Open a web browser at: http://localhost:8686/static/index.html 
+Open a web browser at: http://localhost:8686/static/index.html
diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml b/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml
index ac84433..44fff00 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml
@@ -12,7 +12,7 @@
     </parent>
 
     <properties>
-        <cxf.tomcat.version>8.5.41</cxf.tomcat.version>
+        <cxf.tomcat.version>8.5.47</cxf.tomcat.version>
     </properties>
 
     <dependencies>
diff --git a/distribution/src/main/release/samples/jax_rs/websocket_web/pom.xml b/distribution/src/main/release/samples/jax_rs/websocket_web/pom.xml
index dc373db..6c91c09 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket_web/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/websocket_web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
     <properties>
         <cxf.version>${project.version}</cxf.version>
-        <cxf.tomcat.version>7.0.92</cxf.tomcat.version>
+        <cxf.tomcat.version>7.0.96</cxf.tomcat.version>
     </properties>
     <build>
         <plugins>
@@ -115,17 +115,14 @@
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-websocket</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-            <version>3.3.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>jakarta.ws.rs</groupId>
diff --git a/distribution/src/main/release/samples/wsdl_first/pom.xml b/distribution/src/main/release/samples/wsdl_first/pom.xml
index 2343686..3f204a9 100644
--- a/distribution/src/main/release/samples/wsdl_first/pom.xml
+++ b/distribution/src/main/release/samples/wsdl_first/pom.xml
@@ -51,7 +51,7 @@
                 <plugin>
                     <groupId>org.apache.tomcat.maven</groupId>
                     <artifactId>tomcat7-maven-plugin</artifactId>
-                    <version>2.1</version>
+                    <version>2.2</version>
                     <configuration>
                         <server>myTomcat</server>
                         <url>http://localhost:8080/manager/text</url>


[cxf] 05/08: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 5eb6c92aea1c2a94b65f260aa68339d6949adea0
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Wed Nov 13 12:02:24 2019 +0000

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 15fc38c..3629149 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -41,12 +41,14 @@ B f54062eb331fcf35d9f3a840f532417fccbb2673
 M 09ddfdeaef6f32537dba23fa6d7ef36992b3217b
 M 160f50ed9bd9391b61417716b3a67653c9e81a98
 M 3b119ca6630f1384b93cd718d0cd95ccabc81e91
+M 589e321622b72ae57fab910d76b3e4fb0c160979
 M 59ba4821c92146723df063f9eb6e1c3ae0be5834
 M 5aa0660a9fe324e5c8f36e47e270971d0e85b6f8
 M 6b7e50b87d74dc6b7d1e830b373c7e30c04e14a2
 M 9c462e9bd614d529f0a2fd86490243ea1c858651
 M a4fc3a0462f09dd6c6c920385b67e621d7e36399
 M aabf37788e571426e70250e7a62c7f4502e4d6e9
+M bf1b85003e89c4b3e28384f0de476cf0e5b1af12
 M c1b729ea9f0c43e6560099dbc427751fe33ee088
 M d5b612c220bab496c3dab1731e56b3fea36c1b07
 M d875ceee917237f5c344df989947aff025d45d4f


[cxf] 01/08: Update Jetty

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 5f6c4497f03cbd8a59d0732c9ea329891ef38f49
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Tue Oct 29 11:37:42 2019 +0300

    Update Jetty
    
    (cherry picked from commit 589e321622b72ae57fab910d76b3e4fb0c160979)
    
    # Conflicts:
    #	parent/pom.xml
---
 distribution/src/main/release/samples/pom.xml | 2 +-
 parent/pom.xml                                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index 3bb27df..6ad99b7 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -32,7 +32,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <spring.boot.version>2.1.3.RELEASE</spring.boot.version>
         <spring.cloud.eureka.version>2.0.2.RELEASE</spring.cloud.eureka.version>
-        <cxf.jetty9.version>9.4.21.v20190926</cxf.jetty9.version>
+        <cxf.jetty9.version>9.4.22.v20191022</cxf.jetty9.version>
         <cxf.httpcomponents.client.version>4.5.8</cxf.httpcomponents.client.version>
         <cxf.tika.version>1.22</cxf.tika.version>
     </properties>
diff --git a/parent/pom.xml b/parent/pom.xml
index 8b2d384..4bac5a5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -146,7 +146,7 @@
         <cxf.jettison.version>1.4.0</cxf.jettison.version>
         <cxf.jetty.osgi.version>[9.2,10)</cxf.jetty.osgi.version>
         <cxf.jetty.version>${cxf.jetty9.version}</cxf.jetty.version>
-        <cxf.jetty9.version>9.4.21.v20190926</cxf.jetty9.version>
+        <cxf.jetty9.version>9.4.22.v20191022</cxf.jetty9.version>
         <cxf.jexl.version>2.1.1</cxf.jexl.version>
         <cxf.joda.time.version>2.9.4</cxf.joda.time.version>
         <cxf.johnzon.version>1.1.13</cxf.johnzon.version>


[cxf] 07/08: cxf-systests-ws-rm: improve ManagedEndpointsTest stability

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit a31fcda77805f124af64043871d5b8b08e8a4735
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Fri Nov 1 17:23:26 2019 +0300

    cxf-systests-ws-rm: improve ManagedEndpointsTest stability
    
    (cherry picked from commit 7041e42abf0929f0487d5e90c8a1dacadc1e2fa4)
---
 .../cxf/systest/ws/rm/ManagedEndpointsTest.java    | 104 ++++++++-------------
 1 file changed, 38 insertions(+), 66 deletions(-)

diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java
index 8107a79..35e5339 100755
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ManagedEndpointsTest.java
@@ -22,6 +22,7 @@ package org.apache.cxf.systest.ws.rm;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
 import java.util.logging.Logger;
 
 import javax.management.InstanceNotFoundException;
@@ -43,6 +44,7 @@ import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.GreeterService;
 import org.apache.cxf.management.InstrumentationManager;
 import org.apache.cxf.management.ManagementConstants;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
 import org.apache.cxf.ws.rm.AcknowledgementNotification;
 import org.apache.cxf.ws.rm.RM11Constants;
@@ -50,7 +52,7 @@ import org.apache.cxf.ws.rm.RMManager;
 import org.apache.cxf.ws.rm.RMUtils;
 
 import org.junit.After;
-import org.junit.AfterClass;
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -74,19 +76,18 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
     private static final String CLIENT_CFG = "/org/apache/cxf/systest/ws/rm/managed-client.xml";
 
     private static final Logger LOG = LogUtils.getLogger(ManagedEndpointsTest.class);
-    private static Bus clientBus;
-    private static InProcessServer server;
     private static Bus serverBus;
+    private Bus clientBus;
 
-    static class InProcessServer {
-        private boolean ready;
+    public static class InProcessServer extends AbstractBusTestServerBase {
         private Endpoint ep;
 
-
+        @Override
         public void run() {
             SpringBusFactory bf = new SpringBusFactory();
             serverBus = bf.createBus(SERVER_CFG);
             BusFactory.setDefaultBus(serverBus);
+            setBus(serverBus);
 
             GreeterImpl implementor = new GreeterImpl();
             String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
@@ -95,26 +96,27 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
             ep.publish(address);
 
             LOG.info("Published greeter endpoint.");
-            ready = true;
         }
-        public void stop() {
+        @Override
+        public void tearDown() throws Exception {
             ep.stop();
-            serverBus.shutdown(true);
-        }
-        public boolean isReady() {
-            return ready;
         }
     }
 
     @BeforeClass
-    public static void startServer() throws Exception {
-        server = new InProcessServer();
-        server.run();
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly",
+                   launchServer(InProcessServer.class));
     }
 
-    @AfterClass
-    public static void stopServer() throws Exception {
-        server.stop();
+    @Before
+    public void prepareClient() {
+        SpringBusFactory bf = new SpringBusFactory();
+        clientBus = bf.createBus(CLIENT_CFG);
+        MessageLossSimulator mls = new MessageLossSimulator();
+        clientBus.getOutInterceptors().add(mls);
+
+        BusFactory.setDefaultBus(clientBus);
     }
 
     @After
@@ -124,8 +126,6 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
 
     @Test
     public void testManagedEndpointsOneway() throws Exception {
-        prepareClient();
-
         RMManager clientManager = clientBus.getExtension(RMManager.class);
         RMManager serverManager = serverBus.getExtension(RMManager.class);
 
@@ -182,8 +182,6 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
 
     @Test
     public void testManagedEndpointsOneway12() throws Exception {
-        prepareClient();
-
         RMManager clientManager = clientBus.getExtension(RMManager.class);
         RMManager serverManager = serverBus.getExtension(RMManager.class);
 
@@ -290,7 +288,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         o = mbs.invoke(clientEndpointName, "getSourceSequenceAcknowledgedRange",
                        new Object[]{sseqId}, ONESTRING_SIGNATURE);
         verifyArray("Expected range", o, new Long[]{1L, 1L, 3L, 3L}, true);
-        assertEquals(3L, listener.lastAcknowledgement);
+        assertEquals(3L, listener.getLastAcknowledgement());
 
         o = mbs.invoke(clientEndpointName, "getUnAcknowledgedMessageIdentifiers",
                        new Object[]{sseqId}, ONESTRING_SIGNATURE);
@@ -306,14 +304,14 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
 
         // 3 sec retry interval
         LOG.info("waiting for 3 secs for the retry to complete ...");
-        Thread.sleep(3000);
+        Thread.sleep(3000L);
 
         o = mbs.invoke(clientEndpointName, "getQueuedMessageTotalCount",
                        new Object[]{true}, ONEBOOLEAN_SIGNATURE);
         assertTrue(o instanceof Integer);
         int count = 0;
         while (((Integer)o).intValue() > 0) {
-            Thread.sleep(200);
+            Thread.sleep(200L);
             count++;
             if (count > 20) {
                 fail("Failed to empty the resend queue");
@@ -323,7 +321,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
             assertTrue(o instanceof Integer);
         }
         assertTrue("No queued message " + o, o instanceof Integer && 0 == ((Integer)o).intValue());
-        assertEquals(2L, listener.lastAcknowledgement);
+        assertEquals(2L, listener.getLastAcknowledgement());
 
         o = mbs.invoke(clientEndpointName, "getSourceSequenceAcknowledgedRange",
                        new Object[]{sseqId}, ONESTRING_SIGNATURE);
@@ -357,8 +355,6 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
 
     @Test
     public void testSuspendAndResumeSourceSequence() throws Exception {
-        prepareClient();
-
         RMManager clientManager = clientBus.getExtension(RMManager.class);
 
         InstrumentationManager serverIM = serverBus.getExtension(InstrumentationManager.class);
@@ -399,7 +395,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
 
         // 3 sec retry interval + 1 sec
         LOG.info("waiting for 4 secs for the retry (suspended)...");
-        Thread.sleep(4000);
+        Thread.sleep(4000L);
 
         o = mbs.invoke(clientEndpointName, "getQueuedMessageTotalCount",
                        new Object[]{true}, ONEBOOLEAN_SIGNATURE);
@@ -414,7 +410,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         int count = 0;
         assertTrue(o instanceof Integer);
         while (((Integer)o).intValue() > 0) {
-            Thread.sleep(200);
+            Thread.sleep(200L);
             count++;
             if (count > 100) {
                 //up to 20 seconds to do the resend, should be within 3 or 4
@@ -428,34 +424,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         assertTrue("No queued messages", o instanceof Integer && 0 == ((Integer)o).intValue());
     }
 
-    private void prepareClient() {
-        checkServerReady(30000);
-
-        SpringBusFactory bf = new SpringBusFactory();
-        clientBus = bf.createBus(CLIENT_CFG);
-        MessageLossSimulator mls = new MessageLossSimulator();
-        clientBus.getOutInterceptors().add(mls);
-
-        BusFactory.setDefaultBus(clientBus);
-    }
-
-    private void checkServerReady(long max) {
-        long waited = 0;
-        while (waited < max) {
-            if (server.isReady()) {
-                return;
-            }
-            try {
-                Thread.sleep(1000);
-                waited += 1000;
-            } catch (InterruptedException e) {
-                // ignore
-            }
-        }
-        fail("server not ready");
-    }
-
-    private <T> void verifyArray(String desc, Object value, T[] target, boolean exact) {
+    private static <T> void verifyArray(String desc, Object value, T[] target, boolean exact) {
         assertTrue(desc, target.getClass().isInstance(value));
         @SuppressWarnings("unchecked")
         T[] values = (T[])value;
@@ -478,7 +447,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         }
     }
 
-    private void verifySourceSequence(Object value, String sid, long num, int qsize) {
+    private static void verifySourceSequence(Object value, String sid, long num, int qsize) {
         assertTrue(value instanceof CompositeData);
         CompositeData cd = (CompositeData)value;
         verifyValue(cd, "sequenceId", sid);
@@ -486,7 +455,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         verifyValue(cd, "queuedMessageCount", qsize);
     }
 
-    private void verifyRetransmissionStatus(Object value, long num, int count) {
+    private static void verifyRetransmissionStatus(Object value, long num, int count) {
         assertTrue(value instanceof CompositeData);
         CompositeData cd = (CompositeData)value;
         verifyValue(cd, "messageNumber", num);
@@ -498,12 +467,12 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         assertTrue(now.before((Date)getValue(cd, "next")));
     }
 
-    private void verifyValue(CompositeData cd, String key, Object value) {
+    private static void verifyValue(CompositeData cd, String key, Object value) {
         Object o = getValue(cd, key);
         assertEquals("Expected value", value, o);
     }
 
-    private Object getValue(CompositeData cd, String key) {
+    private static Object getValue(CompositeData cd, String key) {
         Object o = null;
         try {
             o = cd.get(key);
@@ -513,7 +482,7 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         return o;
     }
 
-    private ObjectName getEndpointName(MBeanServer mbs, RMManager manager) throws Exception {
+    private static ObjectName getEndpointName(MBeanServer mbs, RMManager manager) throws Exception {
         ObjectName serviceEndpointQueryName = new ObjectName(
             ManagementConstants.DEFAULT_DOMAIN_NAME + ":" + ManagementConstants.BUS_ID_PROP
             + "=" + manager.getBus().getId() + "," + ManagementConstants.TYPE_PROP + "=WSRM.Endpoint,*");
@@ -522,16 +491,19 @@ public class ManagedEndpointsTest extends AbstractClientServerTestBase {
         return (ObjectName)it.next();
     }
 
-    private class AcknowledgementListener implements NotificationListener {
-        private volatile long lastAcknowledgement;
+    private static class AcknowledgementListener implements NotificationListener {
+        private AtomicLong lastAcknowledgement = new AtomicLong();
 
         @Override
         public void handleNotification(Notification notification, Object handback) {
             if (notification instanceof AcknowledgementNotification) {
                 AcknowledgementNotification ack = (AcknowledgementNotification)notification;
-                lastAcknowledgement = ack.getMessageNumber();
+                lastAcknowledgement.set(ack.getMessageNumber());
             }
         }
 
+        public long getLastAcknowledgement() {
+            return lastAcknowledgement.get();
+        }
     }
 }


[cxf] 03/08: cxf-rt-ws-security: fix SecurityTokenTest for Java 11

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit e3761516185bcf6c42d643c97e585391b74c68b2
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Sat Nov 2 16:08:37 2019 +0300

    cxf-rt-ws-security: fix SecurityTokenTest for Java 11
    
    (cherry picked from commit f4060aaa779d7aeb30e92ff3c31d6d07c596bb22)
---
 .../ws/security/tokenstore/SecurityTokenTest.java  | 36 +++++++++-------------
 1 file changed, 14 insertions(+), 22 deletions(-)

diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/SecurityTokenTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/SecurityTokenTest.java
index d8b2dea..a4c08e9 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/SecurityTokenTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/tokenstore/SecurityTokenTest.java
@@ -20,15 +20,16 @@ package org.apache.cxf.ws.security.tokenstore;
 
 import java.time.Instant;
 import java.time.ZoneOffset;
+import java.time.temporal.ChronoUnit;
 
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
-import org.apache.cxf.ws.security.trust.STSUtils;
-import org.apache.wss4j.common.WSS4JConstants;
 import org.apache.wss4j.common.util.DateUtil;
 
+import static org.apache.wss4j.common.WSS4JConstants.WST_NS_05_12;
+import static org.apache.wss4j.common.WSS4JConstants.WSU_NS;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -38,7 +39,7 @@ public class SecurityTokenTest {
     @org.junit.Test
     public void testCreateSecurityToken() throws Exception {
         String key = "key";
-        Instant created = Instant.now();
+        Instant created = Instant.now().truncatedTo(ChronoUnit.MILLIS);
         Instant expires = created.plusSeconds(20L);
 
         SecurityToken token = new SecurityToken(key, created, expires);
@@ -54,18 +55,15 @@ public class SecurityTokenTest {
 
         // Create Lifetime
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
-        Instant created = Instant.now();
+        Instant created = Instant.now().truncatedTo(ChronoUnit.MILLIS);
         Instant expires = created.plusSeconds(20L);
 
-        String namespace = STSUtils.WST_NS_05_12;
-        writer.writeStartElement("wst", "Lifetime", namespace);
-        writer.writeNamespace("wst", namespace);
-        writer.writeNamespace("wsu", WSS4JConstants.WSU_NS);
-        writer.writeStartElement("wsu", "Created", WSS4JConstants.WSU_NS);
+        writer.writeStartElement("wst", "Lifetime", WST_NS_05_12);
+        writer.writeStartElement("wsu", "Created", WSU_NS);
         writer.writeCharacters(created.atZone(ZoneOffset.UTC).format(DateUtil.getDateTimeFormatter(true)));
         writer.writeEndElement();
 
-        writer.writeStartElement("wsu", "Expires", WSS4JConstants.WSU_NS);
+        writer.writeStartElement("wsu", "Expires", WSU_NS);
         writer.writeCharacters(expires.atZone(ZoneOffset.UTC).format(DateUtil.getDateTimeFormatter(true)));
         writer.writeEndElement();
         writer.writeEndElement();
@@ -83,15 +81,12 @@ public class SecurityTokenTest {
 
         // Create Lifetime
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
-        Instant created = Instant.now();
+        Instant created = Instant.now().truncatedTo(ChronoUnit.MILLIS);
         Instant expires = created.plusSeconds(20L);
 
-        String namespace = STSUtils.WST_NS_05_12;
-        writer.writeStartElement("wst", "Lifetime", namespace);
-        writer.writeNamespace("wst", namespace);
-        writer.writeNamespace("wsu", WSS4JConstants.WSU_NS);
+        writer.writeStartElement("wst", "Lifetime", WST_NS_05_12);
 
-        writer.writeStartElement("wsu", "Expires", WSS4JConstants.WSU_NS);
+        writer.writeStartElement("wsu", "Expires", WSU_NS);
         writer.writeCharacters(expires.atZone(ZoneOffset.UTC).format(DateUtil.getDateTimeFormatter(true)));
         writer.writeEndElement();
         writer.writeEndElement();
@@ -110,13 +105,10 @@ public class SecurityTokenTest {
 
         // Create Lifetime
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
-        Instant created = Instant.now();
+        Instant created = Instant.now().truncatedTo(ChronoUnit.MILLIS);
 
-        String namespace = STSUtils.WST_NS_05_12;
-        writer.writeStartElement("wst", "Lifetime", namespace);
-        writer.writeNamespace("wst", namespace);
-        writer.writeNamespace("wsu", WSS4JConstants.WSU_NS);
-        writer.writeStartElement("wsu", "Created", WSS4JConstants.WSU_NS);
+        writer.writeStartElement("wst", "Lifetime", WST_NS_05_12);
+        writer.writeStartElement("wsu", "Created", WSU_NS);
         writer.writeCharacters(created.atZone(ZoneOffset.UTC).format(DateUtil.getDateTimeFormatter(true)));
         writer.writeEndElement();
 


[cxf] 06/08: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit b3dd8605cb0c39c5fb927799dd560a016ca1c2a5
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Wed Nov 13 12:02:38 2019 +0000

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 3629149..9b1ec6b 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -28,9 +28,11 @@ B 7689d884a64db0352cdb1ac9ee0628a26491f35a
 B 7b333d06910b3d4a84dd77a3c76b48d1b44525b3
 B 8f93152ae86c2d24b95ed9ce5599e6f5453091bc
 B 9196f3364085c9f9ba6319d7b068d44206b0e290
+B 964573a4d386339fd38a21885317ddfe338fd7a6
 B 9fd3ec99d73449779915279cd8bdabe484c29fda
 B a50d2d81dd7d620061ac21b6df7943ad5c6c92cc
 B a69f0444081047e2bbae9e9b8f180d490d417f8a
+B ab3df13b8d15aa36365eb2e10b5961d17330d9a2
 B adb1b8b6280a738f3b2b4f6ea40ee902d94cc2dd
 B c9a2275276c6f8099585519372c24fda1cd7c3e0
 B da4dfeed6867ed628dc05c9a2dbedbebdf33db21