This is an automated email from the ASF dual-hosted git repository. carryxyh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push: new 5aeb049 [Dubbo-2845] Fix OOM in UT testSelectByWeight (#2845) (#2846) 5aeb049 is described below commit 5aeb049ea3e67725377b4e6ed3936c5bc1289deb Author: Yuhao Bi <byh0...@gmail.com> AuthorDate: Thu Nov 29 10:12:13 2018 +0800 [Dubbo-2845] Fix OOM in UT testSelectByWeight (#2845) (#2846) Fix OOM Exception generated during UT --- .../dubbo/rpc/cluster/loadbalance/LoadBalanceBaseTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/LoadBalanceBaseTest.java b/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/LoadBalanceBaseTest.java index 58cd86d..f2af3d3 100644 --- a/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/LoadBalanceBaseTest.java +++ b/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/LoadBalanceBaseTest.java @@ -30,6 +30,7 @@ import org.junit.BeforeClass; import org.junit.Test; import com.alibaba.fastjson.JSON; +import org.mockito.Mockito; import java.util.ArrayList; import java.util.List; @@ -209,10 +210,10 @@ public class LoadBalanceBaseTest { @Before public void before() throws Exception { - weightInvoker1 = mock(Invoker.class); - weightInvoker2 = mock(Invoker.class); - weightInvoker3 = mock(Invoker.class); - weightInvokerTmp = mock(Invoker.class); + weightInvoker1 = mock(Invoker.class, Mockito.withSettings().stubOnly()); + weightInvoker2 = mock(Invoker.class, Mockito.withSettings().stubOnly()); + weightInvoker3 = mock(Invoker.class, Mockito.withSettings().stubOnly()); + weightInvokerTmp = mock(Invoker.class, Mockito.withSettings().stubOnly()); weightTestInvocation = new RpcInvocation(); weightTestInvocation.setMethodName("test");