You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2020/10/27 07:18:23 UTC
[cxf] branch master updated: cxf-systests-jaxrs: fix tests on
Windows
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 7d559ec cxf-systests-jaxrs: fix tests on Windows
7d559ec is described below
commit 7d559ec87e45c9c5d8073b5b2887d8919f54a88d
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Mon Oct 26 13:14:28 2020 +0300
cxf-systests-jaxrs: fix tests on Windows
---
systests/jaxrs/pom.xml | 5 -----
.../apache/cxf/systest/jaxrs/security/BookLoginModule.java | 11 +++--------
.../cxf/systest/jaxrs/security/BookServerSimpleSecurity.java | 2 +-
...AXRSClientServerWebSocketSpringWebAppNoAtmosphereTest.java | 11 ++---------
.../websocket/JAXRSClientServerWebSocketSpringWebAppTest.java | 11 ++---------
5 files changed, 8 insertions(+), 32 deletions(-)
diff --git a/systests/jaxrs/pom.xml b/systests/jaxrs/pom.xml
index cee84c7..80faf66 100644
--- a/systests/jaxrs/pom.xml
+++ b/systests/jaxrs/pom.xml
@@ -35,11 +35,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>${cxf.javassist.version}</version>
- </dependency>
- <dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookLoginModule.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookLoginModule.java
index 8ea15de..37f4cf7 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookLoginModule.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookLoginModule.java
@@ -18,7 +18,6 @@
*/
package org.apache.cxf.systest.jaxrs.security;
-import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
@@ -39,13 +38,9 @@ public class BookLoginModule implements LoginModule {
} catch (Throwable ex) {
throw new RuntimeException(ex);
}
- try {
- fileResource = getClass()
- .getResource("/org/apache/cxf/systest/jaxrs/security/jetty-realm.properties")
- .toURI().getPath();
- } catch (URISyntaxException ex) {
- throw new RuntimeException(ex);
- }
+ fileResource = getClass()
+ .getResource("/org/apache/cxf/systest/jaxrs/security/jetty-realm.properties")
+ .toString();
}
@SuppressWarnings("unchecked")
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSimpleSecurity.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSimpleSecurity.java
index 32e22ce..35fbd2b 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSimpleSecurity.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookServerSimpleSecurity.java
@@ -39,7 +39,7 @@ public class BookServerSimpleSecurity extends AbstractSpringServer {
URL resource = getClass()
.getResource("/org/apache/cxf/systest/jaxrs/security/jetty-realm.properties");
LoginService realm =
- new HashLoginService("BookStoreRealm", resource.toURI().getPath());
+ new HashLoginService("BookStoreRealm", resource.toString());
server.addBean(realm);
}
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppNoAtmosphereTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppNoAtmosphereTest.java
index 937b5d1..9b96291 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppNoAtmosphereTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppNoAtmosphereTest.java
@@ -19,8 +19,6 @@
package org.apache.cxf.systest.jaxrs.websocket;
-import java.net.URISyntaxException;
-
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
import org.apache.cxf.systest.jaxrs.Book;
@@ -54,13 +52,8 @@ public class JAXRSClientServerWebSocketSpringWebAppNoAtmosphereTest extends Abst
server = new org.eclipse.jetty.server.Server(Integer.parseInt(port));
WebAppContext webappcontext = new WebAppContext();
- String contextPath = null;
- try {
- contextPath = JAXRSClientServerWebSocketSpringWebAppTest.class
- .getResource("/jaxrs_websocket").toURI().getPath();
- } catch (URISyntaxException e1) {
- e1.printStackTrace();
- }
+ String contextPath = JAXRSClientServerWebSocketSpringWebAppTest.class
+ .getResource("/jaxrs_websocket").toString();
webappcontext.setContextPath("/webapp");
webappcontext.setWar(contextPath);
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppTest.java
index bb84c92..2a0c8c3 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketSpringWebAppTest.java
@@ -19,8 +19,6 @@
package org.apache.cxf.systest.jaxrs.websocket;
-import java.net.URISyntaxException;
-
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
import org.apache.cxf.systest.jaxrs.Book;
@@ -53,13 +51,8 @@ public class JAXRSClientServerWebSocketSpringWebAppTest extends AbstractJAXRSCli
server = new org.eclipse.jetty.server.Server(Integer.parseInt(port));
WebAppContext webappcontext = new WebAppContext();
- String contextPath = null;
- try {
- contextPath = JAXRSClientServerWebSocketSpringWebAppTest.class
- .getResource("/jaxrs_websocket").toURI().getPath();
- } catch (URISyntaxException e1) {
- e1.printStackTrace();
- }
+ String contextPath = JAXRSClientServerWebSocketSpringWebAppTest.class
+ .getResource("/jaxrs_websocket").toString();
webappcontext.setContextPath("/webapp");
webappcontext.setWar(contextPath);