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

liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new a45206c  Merge pull request #1811, fix unstable hessian protocol unit 
test by adding overload.
a45206c is described below

commit a45206c64f1e293bd164b4f489d9830e5b296112
Author: Huxing Zhang <huxing.zh...@gmail.com>
AuthorDate: Thu May 17 16:04:19 2018 +0800

    Merge pull request #1811, fix unstable hessian protocol unit test by adding 
overload.
    
    Fixed #1667, fixed #1727
---
 .../alibaba/dubbo/rpc/protocol/hessian/HessianProtocolTest.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-hessian/src/test/java/com/alibaba/dubbo/rpc/protocol/hessian/HessianProtocolTest.java
 
b/dubbo-rpc/dubbo-rpc-hessian/src/test/java/com/alibaba/dubbo/rpc/protocol/hessian/HessianProtocolTest.java
index 2ca3fce..6e8ab72 100644
--- 
a/dubbo-rpc/dubbo-rpc-hessian/src/test/java/com/alibaba/dubbo/rpc/protocol/hessian/HessianProtocolTest.java
+++ 
b/dubbo-rpc/dubbo-rpc-hessian/src/test/java/com/alibaba/dubbo/rpc/protocol/hessian/HessianProtocolTest.java
@@ -25,7 +25,7 @@ import com.alibaba.dubbo.rpc.ProxyFactory;
 import com.alibaba.dubbo.rpc.RpcException;
 import com.alibaba.dubbo.rpc.protocol.hessian.HessianServiceImpl.MyException;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 import org.junit.Test;
 
 import static org.junit.Assert.fail;
@@ -41,7 +41,7 @@ public class HessianProtocolTest {
         Assert.assertFalse(server.isCalled());
         ProxyFactory proxyFactory = 
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
         Protocol protocol = 
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
-        URL url = URL.valueOf("hessian://127.0.0.1:5342/" + 
HessianService.class.getName() + "?version=1.0.0");
+        URL url = URL.valueOf("hessian://127.0.0.1:5342/" + 
HessianService.class.getName() + "?version=1.0.0&hessian.overload.method=true");
         Exporter<HessianService> exporter = 
protocol.export(proxyFactory.getInvoker(server, HessianService.class, url));
         Invoker<HessianService> invoker = protocol.refer(HessianService.class, 
url);
         HessianService client = proxyFactory.getProxy(invoker);
@@ -76,7 +76,7 @@ public class HessianProtocolTest {
         Assert.assertFalse(server.isCalled());
         ProxyFactory proxyFactory = 
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
         Protocol protocol = 
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
-        URL url = URL.valueOf("hessian://127.0.0.1:5342/" + 
HessianService.class.getName() + "?version=1.0.0&client=httpclient");
+        URL url = URL.valueOf("hessian://127.0.0.1:5342/" + 
HessianService.class.getName() + 
"?version=1.0.0&client=httpclient&hessian.overload.method=true");
         Exporter<HessianService> exporter = 
protocol.export(proxyFactory.getInvoker(server, HessianService.class, url));
         Invoker<HessianService> invoker = protocol.refer(HessianService.class, 
url);
         HessianService client = proxyFactory.getProxy(invoker);
@@ -100,7 +100,7 @@ public class HessianProtocolTest {
             client.timeOut(6000);
             fail();
         } catch (RpcException expected) {
-            Assert.assertEquals(true, expected.isTimeout());
+            Assert.assertTrue(expected.isTimeout());
         } finally {
             invoker.destroy();
             exporter.unexport();
@@ -121,6 +121,7 @@ public class HessianProtocolTest {
             client.customException();
             fail();
         } catch (MyException expected) {
+
         }
         invoker.destroy();
         exporter.unexport();

-- 
To stop receiving notification emails like this one, please contact
liu...@apache.org.

Reply via email to