* do not invoke test method(#13589) * Fix style check --------- Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
This commit is contained in:
parent
50612ad3a7
commit
966efaab85
|
|
@ -18,6 +18,7 @@ package org.apache.dubbo.rpc.filter;
|
|||
|
||||
import org.apache.dubbo.common.constants.CommonConstants;
|
||||
import org.apache.dubbo.common.extension.Activate;
|
||||
import org.apache.dubbo.common.extension.DisableInject;
|
||||
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
|
||||
import org.apache.dubbo.common.logger.LoggerFactory;
|
||||
import org.apache.dubbo.common.utils.ReflectUtils;
|
||||
|
|
@ -140,7 +141,8 @@ public class ExceptionFilter implements Filter, Filter.Listener {
|
|||
}
|
||||
|
||||
// For test purpose
|
||||
public void setLogger(ErrorTypeAwareLogger logger) {
|
||||
@DisableInject
|
||||
public void mockLogger(ErrorTypeAwareLogger logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class ExceptionFilterTest {
|
|||
exceptionFilter.invoke(invoker, invocation);
|
||||
} catch (RpcException e) {
|
||||
assertEquals("TestRpcException", e.getMessage());
|
||||
exceptionFilter.setLogger(failsafeLogger);
|
||||
exceptionFilter.mockLogger(failsafeLogger);
|
||||
exceptionFilter.onError(e, invoker, invocation);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue