Java Code Examples for com.alibaba.dubbo.rpc.protocol.dubbo.support.DemoService#returnNonSerialized()
The following examples show how to use
com.alibaba.dubbo.rpc.protocol.dubbo.support.DemoService#returnNonSerialized() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DubboProtocolTest.java From dubbo-2.6.5 with Apache License 2.0 | 5 votes |
@Test public void testReturnNonSerialized() throws Exception { DemoService service = new DemoServiceImpl(); protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); try { service.returnNonSerialized(); Assert.fail(); } catch (RpcException e) { Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable")); } }
Example 2
Source File: DubboProtocolTest.java From dubbox with Apache License 2.0 | 5 votes |
@Test public void testReturnNonSerialized() throws Exception { DemoService service = new DemoServiceImpl(); protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); try { service.returnNonSerialized(); Assert.fail(); } catch (RpcException e) { Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable")); } }
Example 3
Source File: DubboProtocolTest.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
@Test public void testReturnNonSerialized() throws Exception { DemoService service = new DemoServiceImpl(); protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); try { service.returnNonSerialized(); Assert.fail(); } catch (RpcException e) { Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable")); } }
Example 4
Source File: DubboProtocolTest.java From dubbo3 with Apache License 2.0 | 5 votes |
@Test public void testReturnNonSerialized() throws Exception { DemoService service = new DemoServiceImpl(); protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); try { service.returnNonSerialized(); Assert.fail(); } catch (RpcException e) { Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable")); } }
Example 5
Source File: DubboProtocolTest.java From dubbox with Apache License 2.0 | 5 votes |
@Test public void testReturnNonSerialized() throws Exception { DemoService service = new DemoServiceImpl(); protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); try { service.returnNonSerialized(); Assert.fail(); } catch (RpcException e) { Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable")); } }
Example 6
Source File: DubboProtocolTest.java From dubbox with Apache License 2.0 | 5 votes |
@Test public void testReturnNonSerialized() throws Exception { DemoService service = new DemoServiceImpl(); protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9050/" + DemoService.class.getName() + "?codec=exchange"))); try { service.returnNonSerialized(); Assert.fail(); } catch (RpcException e) { Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable")); } }