com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker Java Examples
The following examples show how to use
com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.
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: DubboProviderIT.java From pinpoint with Apache License 2.0 | 6 votes |
@Test public void testProvider() { AbstractProxyInvoker abstractProxyInvoker = new AbstractProxyInvoker(new String(), String.class, url) { @Override protected Object doInvoke(Object proxy, String methodName, Class[] parameterTypes, Object[] arguments) throws Throwable { Method method = proxy.getClass().getMethod(methodName, parameterTypes); return method.invoke(proxy, arguments); } }; try { abstractProxyInvoker.invoke(rpcInvocation); } catch (RpcException ignore) { ignore.printStackTrace(); } PluginTestVerifier verifier = PluginTestVerifierHolder.getInstance(); verifier.printCache(); verifier.verifyTraceCount(2); }
Example #2
Source File: DubboProviderIT.java From pinpoint with Apache License 2.0 | 6 votes |
@Test public void testDoNotTrace() { when(rpcInvocation.getAttachment(META_DO_NOT_TRACE)).thenReturn("1"); AbstractProxyInvoker abstractProxyInvoker = new AbstractProxyInvoker(new String(), String.class, url) { @Override protected Object doInvoke(Object proxy, String methodName, Class[] parameterTypes, Object[] arguments) throws Throwable { Method method = proxy.getClass().getMethod(methodName, parameterTypes); return method.invoke(proxy, arguments); } }; try { abstractProxyInvoker.invoke(rpcInvocation); } catch (RpcException ignore) { ignore.printStackTrace(); } PluginTestVerifier verifier = PluginTestVerifierHolder.getInstance(); verifier.printCache(); verifier.verifyTraceCount(0); }