use of org.apache.dubbo.rpc.protocol.dubbo.support.NonSerialized in project dubbo by alibaba.
the class DubboProtocolTest method testNonSerializedParameter.
@Test
public void testNonSerializedParameter() throws Exception {
DemoService service = new DemoServiceImpl();
int port = NetUtils.getAvailablePort();
protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:" + port + "/" + DemoService.class.getName() + "?codec=exchange")));
service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:" + port + "/" + DemoService.class.getName() + "?codec=exchange").addParameter("timeout", 3000L)));
try {
service.nonSerializedParameter(new NonSerialized());
Assertions.fail();
} catch (RpcException e) {
Assertions.assertTrue(e.getMessage().contains("org.apache.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable"));
}
}
Aggregations