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/07/10 09:02:29 UTC
[cxf] branch master updated: cxf-systests-uncategorized: fix test
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 7f00907 cxf-systests-uncategorized: fix test
7f00907 is described below
commit 7f00907652eadf61628b13e673a84df4804dc067
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Fri Jul 10 12:01:48 2020 +0300
cxf-systests-uncategorized: fix test
---
.../java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
index f80974d..b8218c2 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
@@ -23,6 +23,7 @@ import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.URL;
+import java.nio.charset.StandardCharsets;
import javax.activation.DataHandler;
import javax.mail.util.ByteArrayDataSource;
@@ -346,7 +347,6 @@ public class ClientMtomXopTest extends AbstractBusClientServerTestBase {
TestMtom mtomPort = createPort(MTOM_SERVICE, MTOM_PORT, TestMtom.class, true, true);
try {
Holder<DataHandler> param = new Holder<>();
- Holder<String> name;
URL fileURL = getClass().getClassLoader().getResource("测试.bmp");
@@ -355,17 +355,16 @@ public class ClientMtomXopTest extends AbstractBusClientServerTestBase {
((BindingProvider)mtomPort).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED,
validationType);
param.value = new DataHandler(fileURL);
- name = new Holder<>("have name");
+ final Holder<String> name = new Holder<>("have name");
mtomPort.testXop(name, param);
-
- assertEquals("can't get file name", "return detail 测试.bmp", java.net.URLDecoder.decode(name.value));
+
+ assertEquals("can't get file name", "return detail 测试.bmp",
+ java.net.URLDecoder.decode(name.value, StandardCharsets.UTF_8.name()));
assertNotNull(param.value);
}
} catch (UndeclaredThrowableException ex) {
throw (Exception)ex.getCause();
} catch (Exception ex) {
- System.out.println(System.getProperties());
- ex.printStackTrace();
throw ex;
}
}