Skip to content

Commit

Permalink
Moved stress test for connection checkout/checkin and failure detecto…
Browse files Browse the repository at this point in the history
…r to long unit test. Cleaned up comments in ClientRequestExecutorPool to make intended semantics clearer.
  • Loading branch information
jayjwylie committed Jan 15, 2013
1 parent 79277d1 commit eecaba0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,21 @@ public void checkin(SocketDestination destination, ClientRequestExecutor clientR
}
}

/**
* Reset the pool of resources for a specific destination. Idle resources
* will be destroyed. Checked out resources that are subsequently checked in
* will be destroyed. Newly created resources can be checked in to
* reestablish resources for the specific destination.
*/
@Override
public void close(SocketDestination destination) {
factory.setLastClosedTimestamp(destination);
queuedPool.reset(destination);
}

/**
* Close the socket pool
* Permanently close the ClientRequestExecutor pool. Resources subsequently
* checked in will be destroyed.
*/
@Override
public void close() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ public void stressTest() {

final int NUM_SELECTORS_START = 2;
final int NUM_SELECTORS_END = 4;
final int NUM_SELECTORS_STEP = 1;
final int NUM_SELECTORS_STEP = 2;

final int CONNECTIONS_PER_NODE_START = 5;
final int CONNECTIONS_PER_NODE_START = 10;
final int CONNECTIONS_PER_NODE_END = 20;
final int CONNECTIONS_PER_NODE_STEP = 5;
final int CONNECTIONS_PER_NODE_STEP = 10;

final int NUM_PUTTERS_START = 50;
final int NUM_PUTTERS_END = 50;
Expand Down

0 comments on commit eecaba0

Please sign in to comment.