Skip to content

Commit

Permalink
[Dubbo-2845] Fix OOM in UT testSelectByWeight (apache#2845) (apache#2846
Browse files Browse the repository at this point in the history
)

Fix OOM Exception generated during UT
  • Loading branch information
biyuhao authored and carryxyh committed Nov 29, 2018
1 parent 46b3458 commit 5aeb049
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.junit.Test;

import com.alibaba.fastjson.JSON;
import org.mockito.Mockito;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -209,10 +210,10 @@ public String toString() {

@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");
Expand Down

0 comments on commit 5aeb049

Please sign in to comment.