use of com.alibaba.dubbo.rpc.support.MyInvoker in project dubbo by alibaba.
the class AccessLogFilterTest method testInvokeException.
// Test filter won't throw an exception
@Test
public void testInvokeException() {
Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(null);
Invocation invocation = new MockInvocation();
LogUtil.start();
accessLogFilter.invoke(invoker, invocation);
assertEquals(1, LogUtil.findMessage("Exception in AcessLogFilter of service"));
LogUtil.stop();
}
use of com.alibaba.dubbo.rpc.support.MyInvoker in project dubbo by alibaba.
the class AccessLogFilterTest method testCustom.
@Test
public void testCustom() {
URL url = URL.valueOf("test://test:11/test?accesslog=alibaba");
Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(url);
Invocation invocation = new MockInvocation();
accessLogFilter.invoke(invoker, invocation);
}
use of com.alibaba.dubbo.rpc.support.MyInvoker in project dubbo by alibaba.
the class AccessLogFilterTest method testDefault.
// TODO how to assert thread action
@Test
public void testDefault() {
URL url = URL.valueOf("test://test:11/test?accesslog=true&group=dubbo&version=1.1");
Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(url);
Invocation invocation = new MockInvocation();
accessLogFilter.invoke(invoker, invocation);
}
use of com.alibaba.dubbo.rpc.support.MyInvoker in project dubbo by alibaba.
the class ActiveLimitFilterTest method testInvokeLessActives.
@Test
public void testInvokeLessActives() {
URL url = URL.valueOf("test://test:11/test?accesslog=true&group=dubbo&version=1.1&actives=10");
Invoker<ActiveLimitFilterTest> invoker = new MyInvoker<ActiveLimitFilterTest>(url);
Invocation invocation = new MockInvocation();
activeLimitFilter.invoke(invoker, invocation);
}
use of com.alibaba.dubbo.rpc.support.MyInvoker in project dubbo by alibaba.
the class ActiveLimitFilterTest method testInvokeNoActives.
@Test
public void testInvokeNoActives() {
URL url = URL.valueOf("test://test:11/test?accesslog=true&group=dubbo&version=1.1&actives=0");
Invoker<ActiveLimitFilterTest> invoker = new MyInvoker<ActiveLimitFilterTest>(url);
Invocation invocation = new MockInvocation();
activeLimitFilter.invoke(invoker, invocation);
}
Aggregations