com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized Java Examples

The following examples show how to use com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized. 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 vote down vote up
@Test
public void testNonSerializedParameter() 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.nonSerializedParameter(new NonSerialized());
        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 vote down vote up
@Test
public void testNonSerializedParameter() 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.nonSerializedParameter(new NonSerialized());
        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 vote down vote up
@Test
public void testNonSerializedParameter() 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.nonSerializedParameter(new NonSerialized());
        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 vote down vote up
@Test
public void testNonSerializedParameter() 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.nonSerializedParameter(new NonSerialized());
        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 vote down vote up
@Test
public void testNonSerializedParameter() 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.nonSerializedParameter(new NonSerialized());
        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 vote down vote up
@Test
public void testNonSerializedParameter() 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.nonSerializedParameter(new NonSerialized());
        Assert.fail();
    } catch (RpcException e) {
        Assert.assertTrue(e.getMessage().contains("com.alibaba.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable"));
    }
}