2525import com .alibaba .dubbo .rpc .RpcException ;
2626import com .alibaba .dubbo .rpc .protocol .hessian .HessianServiceImpl .MyException ;
2727
28- import junit . framework .Assert ;
28+ import org . junit .Assert ;
2929import org .junit .Test ;
3030
3131import static org .junit .Assert .fail ;
@@ -41,7 +41,7 @@ public void testHessianProtocol() {
4141 Assert .assertFalse (server .isCalled ());
4242 ProxyFactory proxyFactory = ExtensionLoader .getExtensionLoader (ProxyFactory .class ).getAdaptiveExtension ();
4343 Protocol protocol = ExtensionLoader .getExtensionLoader (Protocol .class ).getAdaptiveExtension ();
44- URL url = URL .valueOf ("hessian://127.0.0.1:5342/" + HessianService .class .getName () + "?version=1.0.0" );
44+ URL url = URL .valueOf ("hessian://127.0.0.1:5342/" + HessianService .class .getName () + "?version=1.0.0&hessian.overload.method=true " );
4545 Exporter <HessianService > exporter = protocol .export (proxyFactory .getInvoker (server , HessianService .class , url ));
4646 Invoker <HessianService > invoker = protocol .refer (HessianService .class , url );
4747 HessianService client = proxyFactory .getProxy (invoker );
@@ -76,7 +76,7 @@ public void testHttpClient() {
7676 Assert .assertFalse (server .isCalled ());
7777 ProxyFactory proxyFactory = ExtensionLoader .getExtensionLoader (ProxyFactory .class ).getAdaptiveExtension ();
7878 Protocol protocol = ExtensionLoader .getExtensionLoader (Protocol .class ).getAdaptiveExtension ();
79- URL url = URL .valueOf ("hessian://127.0.0.1:5342/" + HessianService .class .getName () + "?version=1.0.0&client=httpclient" );
79+ URL url = URL .valueOf ("hessian://127.0.0.1:5342/" + HessianService .class .getName () + "?version=1.0.0&client=httpclient&hessian.overload.method=true " );
8080 Exporter <HessianService > exporter = protocol .export (proxyFactory .getInvoker (server , HessianService .class , url ));
8181 Invoker <HessianService > invoker = protocol .refer (HessianService .class , url );
8282 HessianService client = proxyFactory .getProxy (invoker );
@@ -100,7 +100,7 @@ public void testTimeOut() {
100100 client .timeOut (6000 );
101101 fail ();
102102 } catch (RpcException expected ) {
103- Assert .assertEquals ( true , expected .isTimeout ());
103+ Assert .assertTrue ( expected .isTimeout ());
104104 } finally {
105105 invoker .destroy ();
106106 exporter .unexport ();
@@ -121,6 +121,7 @@ public void testCustomException() {
121121 client .customException ();
122122 fail ();
123123 } catch (MyException expected ) {
124+
124125 }
125126 invoker .destroy ();
126127 exporter .unexport ();
0 commit comments