public class ReplicaSetReconnectStrategyTest extends Object
ReplicaSetReconnectStrategy.| Constructor and Description |
|---|
ReplicaSetReconnectStrategyTest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
setUpBeforeClass()
Starts a Mock MongoDB server.
|
void |
tearDown()
Cleans up the test connection.
|
static void |
tearDownAfterClass()
Stops a Mock MongoDB server.
|
void |
testReconnect()
Test method for
ReplicaSetReconnectStrategy.reconnect(Connection)
. |
void |
testReconnectDisagree()
Test method for
ReplicaSetReconnectStrategy.reconnect(Connection)
. |
void |
testReconnectPause()
Test method for
ReplicaSetReconnectStrategy.reconnect(Connection)
. |
void |
testReconnectTimeout()
Test method for
ReplicaSetReconnectStrategy.reconnect(Connection)
. |
public static void setUpBeforeClass()
throws IOException
IOException - On a failure to start the Mock MongoDB server.public static void tearDownAfterClass()
throws IOException
IOException - On a failure to stop the Mock MongoDB server.public void tearDown()
throws IOException
IOException - On a failure to shutdown the test connection.public void testReconnect()
throws IOException
ReplicaSetReconnectStrategy.reconnect(Connection)
.IOException - On a failure.public void testReconnectDisagree()
throws IOException
ReplicaSetReconnectStrategy.reconnect(Connection)
.IOException - On a failure.public void testReconnectPause()
throws IOException
ReplicaSetReconnectStrategy.reconnect(Connection)
. This scenario have the reconnect contact a different server before
settling on the primary.IOException - On a failure.public void testReconnectTimeout()
throws IOException
ReplicaSetReconnectStrategy.reconnect(Connection)
.IOException - On a failure.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.