Skip to content

Commit

Permalink
registers MBean in ClientRequestExecutorPoolTest.java so that ClientS…
Browse files Browse the repository at this point in the history
…ocketStats object will exist for testing
  • Loading branch information
zhongjiewu committed Jun 19, 2012
1 parent 1197e9b commit 9c520a9
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import voldemort.store.socket.SocketDestination;
import voldemort.store.socket.clientrequest.ClientRequestExecutor;
import voldemort.store.socket.clientrequest.ClientRequestExecutorPool;
import voldemort.store.stats.ClientSocketStats;

/**
* Tests for the socket pooling
Expand All @@ -52,6 +53,7 @@ public class ClientRequestExecutorPoolTest extends TestCase {
private ClientRequestExecutorPool pool;
private SocketDestination dest1;
private AbstractSocketService server;
private ClientSocketStats stats;

private final boolean useNio;

Expand All @@ -67,8 +69,15 @@ public static Collection<Object[]> configs() {
@Override
@Before
public void setUp() {
this.stats = new ClientSocketStats();
this.port = ServerTestUtils.findFreePort();
this.pool = new ClientRequestExecutorPool(maxConnectionsPerNode, 1000, 1000, 32 * 1024);
this.pool = new ClientRequestExecutorPool(2,
maxConnectionsPerNode,
1000,
1000,
32 * 1024,
false,
stats);
this.dest1 = new SocketDestination("localhost", port, RequestFormatType.VOLDEMORT_V1);
RequestHandlerFactory handlerFactory = ServerTestUtils.getSocketRequestHandlerFactory(new StoreRepository());
this.server = ServerTestUtils.getSocketService(useNio,
Expand Down

0 comments on commit 9c520a9

Please sign in to comment.