Search in sources :

Example 11 with MockInvocation

use of com.alibaba.dubbo.rpc.support.MockInvocation in project dubbo by alibaba.

the class TpsLimitFilterTest method testWithoutCount.

@Test
public void testWithoutCount() throws Exception {
    URL url = URL.valueOf("test://test");
    url = url.addParameter(Constants.INTERFACE_KEY, "com.alibaba.dubbo.rpc.file.TpsService");
    url = url.addParameter(Constants.TPS_LIMIT_RATE_KEY, 5);
    Invoker<TpsLimitFilterTest> invoker = new MyInvoker<TpsLimitFilterTest>(url);
    Invocation invocation = new MockInvocation();
    filter.invoke(invoker, invocation);
}
Also used : MockInvocation(com.alibaba.dubbo.rpc.support.MockInvocation) Invocation(com.alibaba.dubbo.rpc.Invocation) MockInvocation(com.alibaba.dubbo.rpc.support.MockInvocation) MyInvoker(com.alibaba.dubbo.rpc.support.MyInvoker) URL(com.alibaba.dubbo.common.URL) Test(org.junit.Test)

Aggregations

MockInvocation (com.alibaba.dubbo.rpc.support.MockInvocation)11 Test (org.junit.Test)11 URL (com.alibaba.dubbo.common.URL)10 Invocation (com.alibaba.dubbo.rpc.Invocation)10 MyInvoker (com.alibaba.dubbo.rpc.support.MyInvoker)10 DemoService (com.alibaba.dubbo.rpc.support.DemoService)3 RpcException (com.alibaba.dubbo.rpc.RpcException)2 Result (com.alibaba.dubbo.rpc.Result)1 RpcResult (com.alibaba.dubbo.rpc.RpcResult)1